Skip to content

Commit d881b9d

Browse files
committed
obsolete old AutoVerify
1 parent 9e9b9c2 commit d881b9d

File tree

3 files changed

+37
-4
lines changed

3 files changed

+37
-4
lines changed

src/.editorconfig

-3
Original file line numberDiff line numberDiff line change
@@ -272,9 +272,6 @@ dotnet_style_coalesce_expression = false:error
272272
dotnet_style_null_propagation = true:error
273273
dotnet_style_explicit_tuple_names = true:error
274274

275-
# Use collection expression syntax
276-
resharper_use_collection_expression_highlighting = error
277-
278275
# Prefer "var" everywhere
279276
csharp_style_var_for_built_in_types = true:error
280277
csharp_style_var_when_type_is_apparent = true:error

src/Verify/SettingsTask.cs

+21-1
Original file line numberDiff line numberDiff line change
@@ -208,15 +208,35 @@ public SettingsTask IgnoreStackTrace()
208208
}
209209

210210
/// <inheritdoc cref="VerifySettings.AutoVerify(bool)"/>
211+
[Obsolete("Use SettingsTask.AutoVerify(bool includeBuildServer, bool throwException)")]
211212
[Pure]
213+
public SettingsTask AutoVerify(bool includeBuildServer = true)
214+
{
215+
CurrentSettings.AutoVerify(includeBuildServer, false);
216+
return this;
217+
}
218+
219+
/// <inheritdoc cref="VerifySettings.AutoVerify(bool, bool)"/>
220+
[Pure]
221+
[OverloadResolutionPriority(1)]
212222
public SettingsTask AutoVerify(bool includeBuildServer = true, bool throwException = false)
213223
{
214224
CurrentSettings.AutoVerify(includeBuildServer, throwException);
215225
return this;
216226
}
217227

218-
/// <inheritdoc cref="VerifySettings.AutoVerify(bool)"/>
228+
/// <inheritdoc cref="VerifySettings.AutoVerify(VerifyTests.AutoVerify, bool)"/>
229+
[Obsolete("Use SettingsTask.AutoVerify(AutoVerify, autoVerify, bool includeBuildServer, bool throwException)")]
230+
[Pure]
231+
public SettingsTask AutoVerify(AutoVerify autoVerify, bool includeBuildServer = true)
232+
{
233+
CurrentSettings.AutoVerify(autoVerify, includeBuildServer, false);
234+
return this;
235+
}
236+
237+
/// <inheritdoc cref="VerifySettings.AutoVerify(VerifyTests.AutoVerify, bool, bool)"/>
219238
[Pure]
239+
[OverloadResolutionPriority(1)]
220240
public SettingsTask AutoVerify(AutoVerify autoVerify, bool includeBuildServer = true, bool throwException = false)
221241
{
222242
CurrentSettings.AutoVerify(autoVerify, includeBuildServer, throwException);

src/Verify/VerifySettings.cs

+16
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,28 @@ public void UseTextForParameters(string parametersText)
116116
/// <summary>
117117
/// Automatically accept the results of the current test.
118118
/// </summary>
119+
[Obsolete("Use VerifySettings.AutoVerify(bool includeBuildServer, bool throwException)")]
120+
public void AutoVerify(bool includeBuildServer = true) =>
121+
AutoVerify(includeBuildServer, false);
122+
123+
/// <summary>
124+
/// Automatically accept the results of the current test.
125+
/// </summary>
126+
[OverloadResolutionPriority(1)]
119127
public void AutoVerify(bool includeBuildServer = true, bool throwException = false) =>
120128
AutoVerify(_ => true, includeBuildServer, throwException);
121129

122130
/// <summary>
123131
/// Automatically accept the results of the current test.
124132
/// </summary>
133+
[Obsolete("Use VerifySettings.AutoVerify(AutoVerify, autoVerify, bool includeBuildServer, bool throwException)")]
134+
public void AutoVerify(AutoVerify autoVerify, bool includeBuildServer = true) =>
135+
AutoVerify(autoVerify, includeBuildServer, false);
136+
137+
/// <summary>
138+
/// Automatically accept the results of the current test.
139+
/// </summary>
140+
[OverloadResolutionPriority(1)]
125141
public void AutoVerify(AutoVerify autoVerify, bool includeBuildServer = true, bool throwException = false)
126142
{
127143
if (includeBuildServer ||

0 commit comments

Comments
 (0)