Created
June 10, 2016 13:35
-
-
Save dgg/00e92d5b4c5c839582c6fcab1b370319 to your computer and use it in GitHub Desktop.
migrating-custom-constraints-to-nunit3
This file contains hidden or 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
internal class UppercaseConstraint : Constraint | |
{ | |
public override bool Matches(object current) | |
{ | |
actual = current; | |
var c = (char)current; | |
return char.IsUpper(c); | |
} | |
public override void WriteDescriptionTo(MessageWriter writer) | |
{ | |
writer.Write("An uppercase character"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment