Skip to content

Instantly share code, notes, and snippets.

@dgg
Created June 10, 2016 13:35
Show Gist options
  • Save dgg/00e92d5b4c5c839582c6fcab1b370319 to your computer and use it in GitHub Desktop.
Save dgg/00e92d5b4c5c839582c6fcab1b370319 to your computer and use it in GitHub Desktop.
migrating-custom-constraints-to-nunit3
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