-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support the AssertionChain mechanism in Fluent Assertions 8. (#4)
- Loading branch information
1 parent
9ede640
commit daac80f
Showing
37 changed files
with
445 additions
and
486 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
Src/FluentAssertions.DataSets/Common/AssertionChainExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using FluentAssertions.Equivalency; | ||
using FluentAssertions.Execution; | ||
|
||
namespace FluentAssertions.DataSets.Common; | ||
|
||
internal static class AssertionChainExtensions | ||
{ | ||
/// <summary> | ||
/// Updates the <see cref="AssertionChain"/> with the relevant information from the current <see cref="IEquivalencyValidationContext"/>, including the correct | ||
/// caller identification path. | ||
/// </summary> | ||
public static AssertionChain For(this AssertionChain chain, IEquivalencyValidationContext context) | ||
{ | ||
chain.OverrideCallerIdentifier(() => context.CurrentNode.Description); | ||
|
||
return chain | ||
.WithReportable("configuration", () => context.Options.ToString()) | ||
.BecauseOf(context.Reason); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.