Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Jun 28, 2024
2 parents 35e842f + 999651a commit 02b7a0b
Show file tree
Hide file tree
Showing 18 changed files with 58 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/wiz/Windows_Rider_Gui_Xunit_AzureDevOps.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ Directly after the test runner step add a build step to set a flag if the testru
script: 'echo ##vso[task.setvariable variable=publishverify]Yes'
```
Since the PublishBuildArtifacts step in DevOps does not allow a wildcard it is necessary to need stage the 'received' files before publishing:
Since the PublishBuildArtifacts step in DevOps does not allow a wildcard it is necessary to stage the 'received' files before publishing:
```yaml
- task: CopyFiles@2
Expand Down
3 changes: 3 additions & 0 deletions src/Verify.Expecto/Verifier_Xml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,23 @@ public static partial class Verifier
{
public static Task<VerifyResult> VerifyXml(
string name,
[StringSyntax(StringSyntaxAttribute.Xml)]
string? target,
VerifySettings? settings = null,
[CallerFilePath] string sourceFile = "") =>
Verify(settings, Assembly.GetCallingAssembly()!, sourceFile, name, _ => _.VerifyXml(target));

public static Task<VerifyResult> VerifyXml(
string name,
[StringSyntax(StringSyntaxAttribute.Xml)]
Task<string> target,
VerifySettings? settings = null,
[CallerFilePath] string sourceFile = "") =>
Verify(settings, Assembly.GetCallingAssembly()!, sourceFile, name, _ => _.VerifyXml(target));

public static Task<VerifyResult> VerifyXml(
string name,
[StringSyntax(StringSyntaxAttribute.Xml)]
ValueTask<string> target,
VerifySettings? settings = null,
[CallerFilePath] string sourceFile = "") =>
Expand Down
3 changes: 3 additions & 0 deletions src/Verify.Fixie/Verifier_Json.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@ public static partial class Verifier
{
[Pure]
public static SettingsTask VerifyJson(
[StringSyntax(StringSyntaxAttribute.Json)]
string? target,
VerifySettings? settings = null,
[CallerFilePath] string sourceFile = "") =>
Verify(settings, sourceFile, _ => _.VerifyJson(target));

[Pure]
public static SettingsTask VerifyJson(
[StringSyntax(StringSyntaxAttribute.Json)]
Task<string> target,
VerifySettings? settings = null,
[CallerFilePath] string sourceFile = "") =>
Verify(settings, sourceFile, _ => _.VerifyJson(target));

[Pure]
public static SettingsTask VerifyJson(
[StringSyntax(StringSyntaxAttribute.Json)]
ValueTask<string> target,
VerifySettings? settings = null,
[CallerFilePath] string sourceFile = "") =>
Expand Down
3 changes: 3 additions & 0 deletions src/Verify.Fixie/Verifier_Xml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@ public static partial class Verifier
{
[Pure]
public static SettingsTask VerifyXml(
[StringSyntax(StringSyntaxAttribute.Xml)]
string? target,
VerifySettings? settings = null,
[CallerFilePath] string sourceFile = "") =>
Verify(settings, sourceFile, _ => _.VerifyXml(target));

[Pure]
public static SettingsTask VerifyXml(
[StringSyntax(StringSyntaxAttribute.Xml)]
Task<string> target,
VerifySettings? settings = null,
[CallerFilePath] string sourceFile = "") =>
Verify(settings, sourceFile, _ => _.VerifyXml(target));

[Pure]
public static SettingsTask VerifyXml(
[StringSyntax(StringSyntaxAttribute.Xml)]
ValueTask<string> target,
VerifySettings? settings = null,
[CallerFilePath] string sourceFile = "") =>
Expand Down
3 changes: 3 additions & 0 deletions src/Verify.MSTest/Verifier_Json.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@ partial class Verifier
{
[Pure]
public static SettingsTask VerifyJson(
[StringSyntax(StringSyntaxAttribute.Json)]
string? target,
VerifySettings? settings = null,
[CallerFilePath] string sourceFile = "") =>
Verify(settings, sourceFile, _ => _.VerifyJson(target));

[Pure]
public static SettingsTask VerifyJson(
[StringSyntax(StringSyntaxAttribute.Json)]
Task<string> target,
VerifySettings? settings = null,
[CallerFilePath] string sourceFile = "") =>
Verify(settings, sourceFile, _ => _.VerifyJson(target));

[Pure]
public static SettingsTask VerifyJson(
[StringSyntax(StringSyntaxAttribute.Json)]
ValueTask<string> target,
VerifySettings? settings = null,
[CallerFilePath] string sourceFile = "") =>
Expand Down
3 changes: 3 additions & 0 deletions src/Verify.MSTest/Verifier_Xml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@ partial class Verifier
{
[Pure]
public static SettingsTask VerifyXml(
[StringSyntax(StringSyntaxAttribute.Xml)]
string? target,
VerifySettings? settings = null,
[CallerFilePath] string sourceFile = "") =>
Verify(settings, sourceFile, _ => _.VerifyXml(target));

[Pure]
public static SettingsTask VerifyXml(
[StringSyntax(StringSyntaxAttribute.Xml)]
Task<string> target,
VerifySettings? settings = null,
[CallerFilePath] string sourceFile = "") =>
Verify(settings, sourceFile, _ => _.VerifyXml(target));

[Pure]
public static SettingsTask VerifyXml(
[StringSyntax(StringSyntaxAttribute.Xml)]
ValueTask<string> target,
VerifySettings? settings = null,
[CallerFilePath] string sourceFile = "") =>
Expand Down
3 changes: 3 additions & 0 deletions src/Verify.MSTest/VerifyBase_Json.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,23 @@ partial class VerifyBase

[Pure]
public SettingsTask VerifyJson(
[StringSyntax(StringSyntaxAttribute.Json)]
string? target,
VerifySettings? settings = null,
[CallerFilePath] string sourceFile = "") =>
Verifier.VerifyJson(target, settings, sourceFile);

[Pure]
public SettingsTask VerifyJson(
[StringSyntax(StringSyntaxAttribute.Json)]
Task<string> target,
VerifySettings? settings = null,
[CallerFilePath] string sourceFile = "") =>
Verifier.VerifyJson(target, settings, sourceFile);

[Pure]
public SettingsTask VerifyJson(
[StringSyntax(StringSyntaxAttribute.Json)]
ValueTask<string> target,
VerifySettings? settings = null,
[CallerFilePath] string sourceFile = "") =>
Expand Down
3 changes: 3 additions & 0 deletions src/Verify.MSTest/VerifyBase_Xml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,23 @@ partial class VerifyBase

[Pure]
public SettingsTask VerifyXml(
[StringSyntax(StringSyntaxAttribute.Xml)]
string? target,
VerifySettings? settings = null,
[CallerFilePath] string sourceFile = "") =>
Verifier.VerifyXml(target, settings, sourceFile);

[Pure]
public SettingsTask VerifyXml(
[StringSyntax(StringSyntaxAttribute.Xml)]
Task<string> target,
VerifySettings? settings = null,
[CallerFilePath] string sourceFile = "") =>
Verifier.VerifyXml(target, settings, sourceFile);

[Pure]
public SettingsTask VerifyXml(
[StringSyntax(StringSyntaxAttribute.Xml)]
ValueTask<string> target,
VerifySettings? settings = null,
[CallerFilePath] string sourceFile = "") =>
Expand Down
3 changes: 3 additions & 0 deletions src/Verify.NUnit/Verifier_Json.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@ public static partial class Verifier
{
[Pure]
public static SettingsTask VerifyJson(
[StringSyntax(StringSyntaxAttribute.Json)]
string? target,
VerifySettings? settings = null,
[CallerFilePath] string sourceFile = "") =>
Verify(settings, sourceFile, _ => _.VerifyJson(target));

[Pure]
public static SettingsTask VerifyJson(
[StringSyntax(StringSyntaxAttribute.Json)]
Task<string> target,
VerifySettings? settings = null,
[CallerFilePath] string sourceFile = "") =>
Verify(settings, sourceFile, _ => _.VerifyJson(target));

[Pure]
public static SettingsTask VerifyJson(
[StringSyntax(StringSyntaxAttribute.Json)]
ValueTask<string> target,
VerifySettings? settings = null,
[CallerFilePath] string sourceFile = "") =>
Expand Down
3 changes: 3 additions & 0 deletions src/Verify.NUnit/Verifier_Xml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@ public static partial class Verifier
{
[Pure]
public static SettingsTask VerifyXml(
[StringSyntax(StringSyntaxAttribute.Xml)]
string? target,
VerifySettings? settings = null,
[CallerFilePath] string sourceFile = "") =>
Verify(settings, sourceFile, _ => _.VerifyXml(target));

[Pure]
public static SettingsTask VerifyXml(
[StringSyntax(StringSyntaxAttribute.Xml)]
Task<string> target,
VerifySettings? settings = null,
[CallerFilePath] string sourceFile = "") =>
Verify(settings, sourceFile, _ => _.VerifyXml(target));

[Pure]
public static SettingsTask VerifyXml(
[StringSyntax(StringSyntaxAttribute.Xml)]
ValueTask<string> target,
VerifySettings? settings = null,
[CallerFilePath] string sourceFile = "") =>
Expand Down
3 changes: 3 additions & 0 deletions src/Verify.NUnit/VerifyBase_Json.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,21 @@ public partial class VerifyBase
{
[Pure]
public SettingsTask VerifyJson(
[StringSyntax(StringSyntaxAttribute.Json)]
string? target,
VerifySettings? settings = null) =>
Verifier.VerifyJson(target, settings ?? this.settings, sourceFile);

[Pure]
public SettingsTask VerifyJson(
[StringSyntax(StringSyntaxAttribute.Json)]
Task<string> target,
VerifySettings? settings = null) =>
Verifier.VerifyJson(target, settings ?? this.settings, sourceFile);

[Pure]
public SettingsTask VerifyJson(
[StringSyntax(StringSyntaxAttribute.Json)]
ValueTask<string> target,
VerifySettings? settings = null) =>
Verifier.VerifyJson(target, settings ?? this.settings, sourceFile);
Expand Down
3 changes: 3 additions & 0 deletions src/Verify.NUnit/VerifyBase_Xml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,21 @@ public partial class VerifyBase
{
[Pure]
public SettingsTask VerifyXml(
[StringSyntax(StringSyntaxAttribute.Xml)]
string? target,
VerifySettings? settings = null) =>
Verifier.VerifyXml(target, settings ?? this.settings, sourceFile);

[Pure]
public SettingsTask VerifyXml(
[StringSyntax(StringSyntaxAttribute.Xml)]
Task<string> target,
VerifySettings? settings = null) =>
Verifier.VerifyXml(target, settings ?? this.settings, sourceFile);

[Pure]
public SettingsTask VerifyXml(
[StringSyntax(StringSyntaxAttribute.Xml)]
ValueTask<string> target,
VerifySettings? settings = null) =>
Verifier.VerifyXml(target, settings ?? this.settings, sourceFile);
Expand Down
3 changes: 3 additions & 0 deletions src/Verify.Xunit/Verifier_Json.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@ public static partial class Verifier
{
[Pure]
public static SettingsTask VerifyJson(
[StringSyntax(StringSyntaxAttribute.Json)]
string? target,
VerifySettings? settings = null,
[CallerFilePath] string sourceFile = "") =>
Verify(settings, sourceFile, _ => _.VerifyJson(target));

[Pure]
public static SettingsTask VerifyJson(
[StringSyntax(StringSyntaxAttribute.Json)]
Task<string> target,
VerifySettings? settings = null,
[CallerFilePath] string sourceFile = "") =>
Verify(settings, sourceFile, _ => _.VerifyJson(target));

[Pure]
public static SettingsTask VerifyJson(
[StringSyntax(StringSyntaxAttribute.Json)]
ValueTask<string> target,
VerifySettings? settings = null,
[CallerFilePath] string sourceFile = "") =>
Expand Down
3 changes: 3 additions & 0 deletions src/Verify.Xunit/Verifier_Xml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@ public static partial class Verifier
{
[Pure]
public static SettingsTask VerifyXml(
[StringSyntax(StringSyntaxAttribute.Xml)]
string? target,
VerifySettings? settings = null,
[CallerFilePath] string sourceFile = "") =>
Verify(settings, sourceFile, _ => _.VerifyXml(target));

[Pure]
public static SettingsTask VerifyXml(
[StringSyntax(StringSyntaxAttribute.Xml)]
Task<string> target,
VerifySettings? settings = null,
[CallerFilePath] string sourceFile = "") =>
Verify(settings, sourceFile, _ => _.VerifyXml(target));

[Pure]
public static SettingsTask VerifyXml(
[StringSyntax(StringSyntaxAttribute.Xml)]
ValueTask<string> target,
VerifySettings? settings = null,
[CallerFilePath] string sourceFile = "") =>
Expand Down
3 changes: 3 additions & 0 deletions src/Verify.Xunit/VerifyBase_Json.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,21 @@ public partial class VerifyBase
{
[Pure]
public SettingsTask VerifyJson(
[StringSyntax(StringSyntaxAttribute.Json)]
string? target,
VerifySettings? settings = null) =>
Verifier.VerifyJson(target, settings ?? this.settings, sourceFile);

[Pure]
public SettingsTask VerifyJson(
[StringSyntax(StringSyntaxAttribute.Json)]
Task<string> target,
VerifySettings? settings = null) =>
Verifier.VerifyJson(target, settings ?? this.settings, sourceFile);

[Pure]
public SettingsTask VerifyJson(
[StringSyntax(StringSyntaxAttribute.Json)]
ValueTask<string> target,
VerifySettings? settings = null) =>
Verifier.VerifyJson(target, settings ?? this.settings, sourceFile);
Expand Down
3 changes: 3 additions & 0 deletions src/Verify.Xunit/VerifyBase_Xml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,21 @@ public partial class VerifyBase
{
[Pure]
public SettingsTask VerifyXml(
[StringSyntax(StringSyntaxAttribute.Xml)]
string? target,
VerifySettings? settings = null) =>
Verifier.VerifyXml(target, settings ?? this.settings, sourceFile);

[Pure]
public SettingsTask VerifyXml(
[StringSyntax(StringSyntaxAttribute.Xml)]
Task<string> target,
VerifySettings? settings = null) =>
Verifier.VerifyXml(target, settings ?? this.settings, sourceFile);

[Pure]
public SettingsTask VerifyXml(
[StringSyntax(StringSyntaxAttribute.Xml)]
ValueTask<string> target,
VerifySettings? settings = null) =>
Verifier.VerifyXml(target, settings ?? this.settings, sourceFile);
Expand Down
12 changes: 9 additions & 3 deletions src/Verify/Verifier/InnerVerifier_Json.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@

partial class InnerVerifier
{
public async Task<VerifyResult> VerifyJson(Task<string> target) =>
public async Task<VerifyResult> VerifyJson(
[StringSyntax(StringSyntaxAttribute.Json)]
Task<string> target) =>
await VerifyJson(await target);

public async Task<VerifyResult> VerifyJson(ValueTask<string> target) =>
public async Task<VerifyResult> VerifyJson(
[StringSyntax(StringSyntaxAttribute.Json)]
ValueTask<string> target) =>
await VerifyJson(await target);

public Task<VerifyResult> VerifyJson(string? target)
public Task<VerifyResult> VerifyJson(
[StringSyntax(StringSyntaxAttribute.Json)]
string? target)
{
if (target is null)
{
Expand Down
4 changes: 3 additions & 1 deletion src/Verify/Verifier/InnerVerifier_Xml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ public async Task<VerifyResult> VerifyXml(Task<string> target) =>
public async Task<VerifyResult> VerifyXml(ValueTask<string> target) =>
await VerifyXml(await target);

public Task<VerifyResult> VerifyXml(string? target)
public Task<VerifyResult> VerifyXml(
[StringSyntax(StringSyntaxAttribute.Xml)]
string? target)
{
if (target is null)
{
Expand Down

0 comments on commit 02b7a0b

Please sign in to comment.