Repository navigation
Cyrille DUPUYDAUBY edited this page Mar 12, 2019
·
15 revisions
-
CaptureConsole class mocks the system console. Using it you can inject/simulate user input (with Input and InputLine methods) and read/review what the code has put on the console (with the Output property). The class is disposable: nnormal behavior is restored on Dispose. Example
using (var console = new CaptureConsole) { console.InputLine("12+13"); // the code I need to check (a calculator here) Calculator.Process(); // perform the check Check.That(console.Output).IsEqualTo("25"); }
- Console related checks (see above)
- Stabilize Assembly Version to reduce friction induced by strong naming (assembly version is still V2.4.0)
- Align to Microsoft guidelines for OSS libraries (https://docs.microsoft.com/en-us/dotnet/standard/library-guidance/)
- HasAvalue() and HasNoValue() are available on all nullable types
- Add support for WithCustomMessage for dynamics.
- Revised signature for enumerable checks to reduce type erasure (loss of type information when chaining checks). Regression tests have been added regarding non generic IEnumerable support, but as the changes are significant, please revert to us if you face issues.
- Fixes reporting of end of line markers: only carriage return chars were reported.
- Changed error text for missing or extra lines in string to make it clearer.
- IsEqualTo provides more details for IEnumerable (make sure first different item is visible).
- Number of items in expected value was often not reported in error messages.
- Fix false positive with TimeSpan due linked to precision loss. It concerns: IsEqualTo(TimeSpan), IsLessThan(TimeSpan), IsGreaterThan(TimeSpan)
- Fix random FileNotFound exceptions on the first failing assertion while using XUnit in some specific setup.
- Error message for Check.ThatCode().LastsLessThan did not report the actual time.
- Error message for Not.ThrowsAny() was wrong.
- Hashtable not properly reported in error messages.
- Fixed error messages for negated checks on dynamics.
- Fix false positive for IsNotZero (and IsZero) for decimal that are close to 0 (<.5).
- IsEquivalentTo now supports dictionary types.
- IsEqualTo now supports dictionary types. Error message hints to use IsEquivalentTo when relevant.
- #269, #274, #270, #275, #276, #280, #283, #184, #284, #286, #290
- 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