- Gregor Stamac extended the XML assertions with the methods
NotBeEquivalentToto perform a deep comparison between two XML fragments.
- Vossad01 added a
Beoverload to the
Beassertions against a nullable
- He also added
NotBeNullOrWhiteSpaceto the string assertions and marked the old
- ClockworkPenguin extended the string assertions with
- We now support the PCL version of NUnit when used in a Windows Store class library serving as a unit test container.
- Added an overload to
BeBinarySerializablethat can be used to tweak the internal comparison between the original and the deserialized objects based on the
EquivalencyAssertionOptionsof the object graph comparison API. (#16)
NotBeFalseassertions for (nullable) booleans.
BeCloseToas an assertion on a
TimeSpan, similarly to what already exists for
- Added the possibility to disable recursion during an object graph equivalency assertion using the
Bug fixes and minor improvements
- We added a non-generic overload of
- Rory Primrose ensured that the
ShouldNotThrowmethods now properly support nested aggregate exceptions. (#19)
- Although we didn't actually change anything, the authors of NSpec have confirmed FA works with their framework well.
- We fixed an intermittent cyclic reference error that sometimes occurred when asserting the equivalency of a complex object graph using the
- Adam Ralph fixed a
- Nullable properties were never properly passed into any custom assertions during an assertion of the structural equality (#33).
- Gregor Stamac also fixed an object equivalency assertion error when working with nullable
NotBe()threw an exception when the expected object was
- Mark Lam improved the behavior of the collection assertions when working with collections of strings. FA will no longer try to interpret a string as a collection of characters.
- When using
ShouldAllBeEquivalentToto compare two collections with the same number of elements but one contains duplicates (so some items are missing) the assertion wouldn't fail. Gregor Stamac fixed this for us as well.
- The collection assertion
NotBeEquivalentToincorrectly interpreted two intersecting collections of the same length as 'equivalent'. (#52)
- Improved the resilience of the
- The old property comparison API (e.g.
object.ShouldHave().AllProperties().EqualTo(other)) has been marked as
[Obsolete]and will be removed in the next major version. Please use the newer object equivalency API.
- Although it may not be a widely used feature, as of version 2.2, Fluent Assertions will not automatically search for custom value formatters anymore. This scanning proved to incur a significant performance hit. Now you need to explicitly enable that using the
valueFormatters. Valid values include
Specific. The 2nd option will scan all assemblies in the
AppDomainas version 2.1 did by default. The last option also requires you to set the
valueFormattersAssemblysetting key with the (partial) name of an assembly FA should scan. Since Silverlight and Windows Phone do not support an
app.configfile, you'll need to configure those settings through the
ValueFormatterAssemblyproperties of the static