New Features
Breaking Changes
Improvements/Bugs
- Added a new set of extensions for asserting that events were properly raised.
- BeOfType<T>() and BeAssignableTo<T>() are available for all reference types.
- Added an OnlyContain() to the collection assertions that takes a lambda expression.
- Added an overload of someCollection.Should().Contain() that takes both an IEnumerable and a params array.
- Added support for subject.ShouldHave().SharedProperties().EqualTo(otherObject).
- Added support for an additional But(x => x.Property) method that can be combined with AllProperties() and SharedProperties()
Breaking Changes
- Changed the way test framework assemblies are found so that they are not relying on specific versions anymore.
- It will automatically find the framework assembly, but you can force it using an <appSetting> with name FluentAssertions.TestFramework
- Introduced separate versions for .NET 3.5 and .NET 4.0, both supporting all test frameworks.
- Switched to Silverlight 4 for the Silverlight version of Fluent Assertions.
- Renamed the Assertions base-class to ReferenceTypeAssertions.
- BeOfType<T>() was not properly checking that the subject is of the exact same type and not a subclass.
Improvements/Bugs
- Signed all assemblies with a strong name.
- Added some missing XML comments.
- Improved the extensibility by exposing the subject-under-test via a public Subject property and making all contructors protected.
- If the exception message is shorter than the expected one, but starts with the same text, it was not detected as a difference.
- Fixed a NullReferenceException when calling ObjectAssertions().Be() on a null object.
- As<T>() uses a type safe-cast now so that you can do stuff like someObject.As<SomeType>().ShouldNotBeNull();
- Fixed a bug that caused the property comparison assertions to miss internal or base-class properties.