-
Notifications
You must be signed in to change notification settings - Fork 53
Check.ThatDynamic
Cyrille DUPUYDAUBY edited this page Jul 20, 2019
·
2 revisions
Check.ThatDynamic allows to perform basic checks on Dynamics.
Checks that the sut is a non null dynamic.
dynamic sut = "someDynamic";
// This check succeeds
Check.ThatDynamic(sut).IsNotNull();
// This check fails
Check.ThatDynamic(null).IsNotNull();
Checks that the sut has the expected reference; fails otherwise.
dynamic sut = "someDynamic";
// This check succeeds
Check.ThatDynamic(sut).IsSameReferenceAs(sut);
// This check fails
Check.ThatDynamic(sut).IsSameReferenceAs("other");
- 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