-
Notifications
You must be signed in to change notification settings - Fork 53
Characters
Cyrille DUPUYDAUBY edited this page Feb 5, 2018
·
4 revisions
All characters properties are evaluated against Unicode.
Checks that the sut is a letter; fails otherwise.
// this check succeeds
Check.That('b').IsALetter();
// this check fails
Check.That('4').IsALetter();
Checks that the sut is a digit; fails otherwise.
// this check succeeds
Check.That('2').IsADigit();
// this check fails
Check.That('A').IsADigit();
Checks that the sut is a punctuation mark; fails otherwise.
// this check succeeds
Check.That(';').IsAPunctuationMark();
// this check fails
Check.That('A').IsAPunctuationMark();
Checks that sut is the same letter than expected, disregarding case; fails otherwise. Note that expected must be a letter.
// this check succeeds
Check.That('a').IsSameLetterAs('A');
// this check fails
Check.That('2').IsSameLetterAs('2');
Checks that sut is the same letter than expected, with a different case; fails otherwise. Note that expected must be a letter.
// this check succeeds
Check.That('a').IsSameLetterButWithDifferentCase('A');
// those checks fail
Check.That('2').IsSameLetterButWithDifferentCase('a');
Check.That('a').IsSameLetterButWithDifferentCase('a');
- Welcome
- How to start
- Customising error messages
-
Check.That
- All (Equality, Type)
- Reference types
- Members based
- IEnumerable (Properties, Content, Elements)
- String (Properties, Content, RegExp )
- Numeric Type(Properties, Comparisons, Floating)
- Dictionary
- Char (Properties, Value)
- IComparable
- DateTime
- DateTimeOffset
- Misc: Boolean, TimeSpan, Stream, Enum, EventWaitHandle
- Check.ThatCode
- Check.ThatDynamic
- Extensibility
- Auxiliary types (TimeUnit)
- Mocks