Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Comparing an object graph against IEnumerable works now as expected
- Loading branch information
1 parent
68ca857
commit 7ab0797
Showing
12 changed files
with
255 additions
and
146 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
using System; | ||
|
||
namespace FluentAssertions.Execution | ||
{ | ||
public class ContinuedAssertionScope | ||
{ | ||
private readonly AssertionScope predecessor; | ||
private readonly bool predecessorSucceeded; | ||
|
||
public ContinuedAssertionScope(AssertionScope predecessor) | ||
{ | ||
this.predecessorSucceeded = predecessor.Succeeded; | ||
this.predecessor = predecessor; | ||
} | ||
|
||
public GivenSelector<T> Given<T>(Func<T> selector) | ||
{ | ||
return predecessor.Given<T>(selector); | ||
} | ||
|
||
public ContinuedAssertionScope ForCondition(bool condition) | ||
{ | ||
if (predecessorSucceeded) | ||
{ | ||
predecessor.ForCondition(condition); | ||
} | ||
|
||
return this; | ||
} | ||
|
||
public Continuation FailWith(string message, params object[] args) | ||
{ | ||
return predecessor.FailWith(message, args); | ||
} | ||
|
||
public AssertionScope BecauseOf(string because, params object[] becauseArgs) | ||
{ | ||
return predecessor.BecauseOf(because, becauseArgs); | ||
} | ||
} | ||
} |
Oops, something went wrong.