- {New} Supports .NET 4.5.0, .NET Standard 1.4, 1.6 and 2.0
- {New} Include the name of the subject-under-test from the C# code in the failure message - #705
- {New} Added
NotBeInRange
,NotHaveSameCount
,NotApproximately
,NotBeAssignableTo
to the numeric assertions - #598, #599, #600, #601 - {New} Added
[Not]Have{Implicit,Explicit}ConversionOperator
,NotBeDecoratedWith
andThatAreNotDecoratedWith
to the type assertions - #604, #609 - {New} Added
NotHaveCount
,HaveCount{Greater,Less}{Than,OrEqualTo}
to the numeric assertions - #618 - {New} Report all indices offending
collection.Should().NotContainNulls
- #608 - {New} Added predicate overload to
OnlyHaveUniqueItems
andNotContainNull
collection assertions - #611 - {New} Fail fast on
NotIntersectWith
,NotBeSubsetOf
,NotHaveSameCount
,NotBeEquivalentTo
- #610 - {New} Added
BeCloseTo
withTimeSpan
- #621 - {New} Added missing/negations type assertions/selectors - #620
- {New} Added
HaveCount
variants for generic collections - #623 - {New} Added
string.ContainAllOf
andstring.ContainAnyOf
to verify a string against a collection of strings - #633 - {New} Added various examples to the docs on migrating from MSTest and tips for improved assertions - #614
- {New} Added more
TimeSpan
conversions - #650 - {New} Added
TimeSpan
extensions for micro and nano seconds - #669 - {New} Include the missing and superfluous item keys when comparing dictionaries - #723
- {New} Added an overload of
BeEquivalentTo
that takes aparams
array - #733 - {New} Added
BeDecoratedWithOrInherit
andNotBeDecoratedWithOrInherit
for type assertions - #727 - {New} Fail when
Should().[Not]Throw
is used onasync void
action - #737 - {New} Add
ThatAre[Not]DecoratedWithOrInherit
- #748 - {New} Add support for
unsigned
types andsbyte
- #750 - {Changed} Report all non-duplicate keys in
collection.Should().OnlyHaveUniqueItems
- #607 - {Changed} Relaxing the constructor for type selectors - #644
- {Changed} Constrained the generic parameter of
ThatAreDecoratedWith
to attributes - #642 - {Breaking} Unified
ShouldBeEquivalentTo
,ShouldAllBeEquivalentTo
andcollection.Should().BeEquivalentTo
- #593 - {Breaking} Use the expectation instead of the subject to drive equivalency assertions in and moved them to the assertion classes - #593
- {Breaking} Removed support for Silverlight, WP for Silverlight and .NET 4.0 - #536
- {Breaking} Disable automatic conversion of property values in
BeEquivalentTo
and provided an opt-in APIWithAutoConversion
instead - #616 - {Breaking} Replaced the old thread-unsafe
MonitorEvents
API with a newMonitor
extension method that will return a thread-safe monitoring scope that exposes methods likeShould().Raise()
and metadata such asOccurredEvents
andMonitoredEvents
- #625 - {Breaking} Changed
Should[Not]Throw()
toShould().[Not]Throw
in order align all APIs - #648 - {Breaking} Changed the
IValueFormatter
contract to better support cyclic reference detection (#649) - {Breaking} Align
ExecutionTime[Of]
with the rest of the v5.0.0 API by usingShould()
to assert - #653 - {Breaking} Removed
WithInnerMessage
as chainingWithInnerException
withWithMessag
gives the same result - #666 - {Breaking} Moved
DateTime
&Timespan
construction to the 'Extensions' namespace - #675 - {Breaking} Change the extension methods for specifying milliseconds and nanoseconds to plural names - #703
- {Breaking} Assume types that override
Equals
to have value semantics and addedComparingByValue
andComparingByMembers
- #740 - {Breaking} Renamed
ISubjectInfo
toIMemberInfo
to better reflect its purpose - #747 - {Fix} Added proper formatting of
Task
andTask<T>
- #651 - {Fix} Chaining
Where
onWithInnerExceptionExactly
should work on the correct type - #656 - {Fix}
BeDataContractSerializable
didn't allow customizing the comparison - #667 - {Fix} Improved formatting for more precise
DateTime
,DateTimeOffset
, andTimeSpans
- #669 - {Fix} When comparing two
Type
s who both happens to be null,NotBe()
andBe()
should still work as expected - #672 - {Fix} Include generic type in failure message - #691
- {Fix} Improved
DateTime
formatting for near-zero values - #695 - {Fix} Ignore double braces in failure messages - #715
- {Fix} Better messages when comparing empty collections - #719
- {Fix} Several performance improvements - #725
- {Fix} The equivalency report contained an empty line if no conversion was specified.
- {Fix} Unwrapping of
TargetInvocationException
s to improve the failure messages in equivalency assertions - {Fix} Nested dictionary items didn't use the right expectation type - #746
- {Fix} Fail fast
ReferenceEquals
onNotEqual
- #606