title | permalink | layout | classes | sidebar | ||
---|---|---|---|---|---|---|
Releases |
/releases/ |
single |
wide |
|
What's New
- Added
string.Should().NotBeEquivalentTo
- #1134 - Added
collectionOfStrings.Should().ContainMatch()
to assert that the collection contains at least one string that matches a wildcard pattern - #1138 - Added overloads of
NotBeInAscendingOrder
andNotBeInDescendingOrder
that take a property expression - #1140 - Include the index in the XPath information reported while comparing
XDocument
s for equivalence - #1181 - Added
NotHaveSameCount
andHaveSameCount
for dictionary assertions - #1178 - Extended
string.Should().Contain()
andstring.Should().ContainEquivalentOf()
to test the number of times a phrase exists in a string usingtheString.Should().Contain("is a", MoreThan.Thrice())
- #1145 - Added support for methods returning
ValueTask
andValueTask<T>
- #1158 - Added support using
SatisfyRespectively
on all collections, including collections ofstring
- #1201
Fixes
- Updated the docs to clarify that
CompleteWithin
works onFunc<Task>
and not onTask
directly - #1127. - Renamed collection assertion
NotBeAscendingInOrder
andNotBeDescendingInOrder
toNotBeInAscendingOrder
andNotBeInDescendingOrder
(in a non-breaking way) - #1140 - Collections containing
null
s where not properly treated as equivalent byBeEquivalentTo
- #1143 BeEquivalentTo
now allows selecting an explicit interface member over a regular instance member when usingRespectingDeclaredTypes
and the expectation type is an interface - #1144- Fixed a crash that can occur when trying to determine the caller identity under .NET Native - #1149
- Ensured that determining the caller identity works for namespaces that contain the phrase
System
and don't match on partial namespace segments - #1193 BeEquivalentTo
on anXDocument
could report the incorrect path to a self-closing XML tag - #1170BeEquivalentTo
on multi-dimensional arrays with empty elements could cause an internal error - #1167- Several assertion APIs did not include the reason in the failure messages - #1172
- A self-closing XML element was not treated as equivalent to an empty element with the same name - #1174
- Ensure that type assertion
ThatAreUnderNamespace
handles types in the global namespaces correctly - #1197 - When comparing whether two objects are equal, a conversion should be precision preserving - #1202
BeEquivalentTo
on normalTuple
s should use structural equivalency instead of treating them as value types - #1206- Some platforms throw reflection exceptions when trying to use
ConfigurationManager
. This is now handled more gracefully - #1210 - Reintroduced the package dependency on
System.Xml.Linq
for .NET 4.5/4.7 - #79 - Treat enums and their numeric representations in structural object graph comparisons the same - #1208
Thanks to contributors Ronald Kroon, Daniel Petrov, @david-a-jetter, Lukas Grützmacher and Ben Randall.
And special thanks to Matthias Koch to switch us over to the awesome Nuke build system.
What's New
- Added
Match
method to (nullable) numeric assertions - #1112
Fixes
- Using a custom
IAssertionStrategy
with anAssertionScope
did not always capture all assertion failures - #1118 - Ensured
null
arguments are handled with clearer exception messages - #1117
Special thanks to contributors @liklainy and Amaury Levé.
What's New
- Added thread-safety to tests using
AssertionScope
while running manyasync
tests concurrently - #1091 - Allow users to specify a custom
IAssertionStrategy
for the assertion scope, for instance, to create screenshots when a test fails - #1094 & #906. - Supports .NET Core 3.0 Preview 7 - #1107
Fixes
Excluding
withBeEquivalentTo
did not always work well with overridden properties - #1087 & #1077- Failure message formatting threw a
FormatException
when a nested message contains braces - #1092 - Fixed confusing
(Not)BeAssignableTo
failure messages - #1104 & #1103 - Fixed a potential leakage of failure messages between multiple assertions - #1105
Kudos to conklinb and Amaury Levé for notable contributions and my partner-in-crime Jonas Nyrup for some of the fixes, a lot of (internal) quality improvements and his critical eye.
What's New
- Added official support for .NET Core 3 (Preview 5 or later) - #1057
- Introduced
SatisfyRespectively
on collections - #1043 - Added an alternative fluent syntax for evaluating/invoking actions - #1017
- Added overloads of
Invoking
andAwaiting
for different sets of generic parameters - #1051 NotThrowAfter
is now also available for .NET Standard 1.3 and 1.6 - #1050- Added
CompleteWithin
to assert asynchronous operations complete within a time span - #1013/#1048 - Added
NotBeEquivalent
for objects - #1071 - Added
WithMessage()
forasync
exception assertions - #1052 - Added extension methods like
100.Nanosecond()
and20.Microsecond()
to represent time spans - #1069
Fixes
AllBeAssignableTo
andAllBeOfType
did not work for list of types - #1007- Backslashes in subject or expected result were not correctly shown in the message - #986
BeOfType
does not attach to theAssertionScope
correctly - #1002- Event monitoring did not detect events on interfaces - #821
- Fix continuation on
NotThrow(After)
in chainedAssertionScope
invocations - #1031 - Allow nesting equivalency checks in custom assertion rules when using
BeEquivalentTo
- #1031 - Removed redundant use of the thread pool in async assertions - #1020
- Improved formatting of multidimensional arrays - #1044
- Better handling of exceptions wrapped in
AggregateException
s - #1041 - Fix
BadImageFormatException
under the .NET Core 3.0 Preview - #1057 ThrowExactly
andThrowExactlyAsync
now support expecting anAggregateException
- #1046
Kudos to Lukas Grützmacher, Matthias Lischka, Christoffer Lette, Ed Ball, David Omid, mu88, Dmitriy Maksimov and Ivan Shimko for the contributions and Jonas Nyrup to make this release possible again.
Fixes
- Provide opt-out to
AssertionOptions(o => o.WithStrictOrdering())
- #974 - Add collection assertion
ContainEquivalentOf
- #950 - Add
Should().NotThrowAfter
assertion for actions - #942
Kudos to @BrunoJuchli, @matthiaslischka and @frederik-h for these amazing additions.
Fixes
- Performance fixes in
BeEquivalenTo
- #935 - Reverted 5.5.0 changes to
AssertionScope
to ensure binary compatibility - #977
Fixes
- Allows
BeEquivalentTo
to handle a non-generic collection as the SUT - #975, #973 - Optimized performance of
IncludeMemberByPathSelectionRule
- #969
What's New
- Now provides a hint when strings differ in length and contain differences - #915, #907
- Added
ThrowAsync
,ThrowExactlyAsync
andNotThrowAsync
- #931 - Added support for
Should().Throw
andShould().NotThrow
forFunc<T>
- #951 - Added support for
private protected
access modifier - #932 - Updated
BeApproximately
to support nullable types for both the subject and the expectation nullable - #934 - Added
async
version ofExecutionTime
to - #938 - Updated
NotBeApproximately
to accepting nullable subject and expectation - #939 type.Should().Be(type)
now support open generics - #954, #955
Fixes
- Minor performance improvements to prevent rendering messages if a test did not fail - #921, #915
- Improve performance of
Should().AllBeEquivalentTo()
- #920, #914 - Improve the presentation of enums to include the value and the number - #923, #897
BeEquivalentTo
withWithStrictOrdering
produced messy failure message - #918- Fixes detecting checking equivalency of a
null
subject to a dictionary - #933 - Fixes duplicate conversions being mentioned in the output of the equivalency API - #941
- Comparing an object graph against
IEnumerable
now works now as expected - #911 - Selecting members during object graph assertions now better handles
new
overrides -#960, #956
Note In versions prior to 5.5, FA may have skipped certain properties in the equivalency comparison. #960 fixes this, so this may cause some breaking changes.
Lots of kudos @jnyrup and @krajek for a majority for the work in this release.