-
Notifications
You must be signed in to change notification settings - Fork 722
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support And/Or linking with DictionaryContainsKeyValuePairConstraint (#…
- Loading branch information
1 parent
328dc52
commit 0d3c43c
Showing
4 changed files
with
151 additions
and
10 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
27 changes: 27 additions & 0 deletions
27
src/NUnitFramework/framework/Constraints/Operators/InsteadOperator.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,27 @@ | ||
// Copyright (c) Charlie Poole, Rob Prouse and Contributors. MIT License - see LICENSE.txt | ||
|
||
namespace NUnit.Framework.Constraints | ||
{ | ||
/// <summary> | ||
/// Operator that replaces the left constraint with the right constraint | ||
/// </summary> | ||
public class InsteadOperator : BinaryOperator | ||
{ | ||
/// <summary> | ||
/// Construct an InsteadOperator | ||
/// </summary> | ||
public InsteadOperator() | ||
{ | ||
left_precedence = 1; | ||
right_precedence = 99; | ||
} | ||
|
||
/// <summary> | ||
/// Apply the operator to replace the left constraint | ||
/// </summary> | ||
public override IConstraint ApplyOperator(IConstraint left, IConstraint right) | ||
{ | ||
return right; | ||
} | ||
} | ||
} |
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