Skip to content

Releases: fluentassertions/fluentassertions

5.1.1

11 Feb 19:32
a3cd296
Compare
Choose a tag to compare
  • {New} Add BeEquivalentTo to objects implementing IComparable - #763
  • {Fix} The Nuget package was not using the new icon yet
  • {Fix} Fix substitution of contextual tags - #754
  • {Fix} Add a target for .NET 4.7 that doesn't require the ValueTuple dependency - #758
  • {Fix} Avoid a NullReferenceException in BeEquivalentTo while asserting the subject is a collection - #760

Powered by @jnyrup

5.0.0

04 Feb 13:34
4ccdc19
Compare
Choose a tag to compare
  • {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 and ThatAreNotDecoratedWith 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 and NotContainNull collection assertions - #611
  • {New} Fail fast on NotIntersectWith, NotBeSubsetOf, NotHaveSameCount ,NotBeEquivalentTo - #610
  • {New} Added BeCloseTo with TimeSpan - #621
  • {New} Added missing/negations type assertions/selectors - #620
  • {New} Added HaveCount variants for generic collections - #623
  • {New} Added string.ContainAllOf and string.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 a params array - #733
  • {New} Added BeDecoratedWithOrInherit and NotBeDecoratedWithOrInherit for type assertions - #727
  • {New} Fail when Should().[Not]Throw is used on async void action - #737
  • {New} Add ThatAre[Not]DecoratedWithOrInherit - #748
  • {New} Add support for unsigned types and sbyte - #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 and collection.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 API WithAutoConversion instead - #616
  • {Breaking} Replaced the old thread-unsafe MonitorEvents API with a new Monitor extension method that will return a thread-safe monitoring scope that exposes methods like Should().Raise() and metadata such as OccurredEvents and MonitoredEvents - #625
  • {Breaking} Changed Should[Not]Throw() to Should().[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 using Should() to assert - #653
  • {Breaking} Removed WithInnerMessage as chaining WithInnerException with WithMessag 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 added ComparingByValue and ComparingByMembers - #740
  • {Breaking} Renamed ISubjectInfo to IMemberInfo to better reflect its purpose - #747
  • {Fix} Added proper formatting of Task and Task<T> - #651
  • {Fix} Chaining Where on WithInnerExceptionExactly should work on the correct type - #656
  • {Fix} BeDataContractSerializable didn't allow customizing the comparison - #667
  • {Fix} Improved formatting for more precise DateTime, DateTimeOffset, and TimeSpans - #669
  • {Fix} When comparing two Types who both happens to be null, NotBe() and Be() 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 TargetInvocationExceptions to improve the failure messages in equivalency assertions
  • {Fix} Nested dictionary items didn't use the right expectation type - #746
  • {Fix} Fail fast ReferenceEquals on NotEqual - #606

5.0.0-rc.5

31 Jan 10:17
04dc10b
Compare
Choose a tag to compare
  • {Fix} Ensures that a KeyValuePair doesn't stop deep comparisons - #752

5.0.0-rc.4

28 Jan 16:55
5f31377
Compare
Choose a tag to compare
  • {Breaking} Assume types that override Equals to have value semantics and added ComparingByValue and ComparingByMembers - #740
  • {Breaking} Renamed ISubjectInfo to IMemberInfo to better reflect its purpose - #747
  • {Fix} Unwrapping of TargetInvocationExceptions to improve the failure messages in equivalency assertions
  • {Fix} Nested dictionary items didn't use the right expectation type - #746
  • {New} Fail when Should().[Not]Throw is used on async void action - #737
  • {New} Add ThatAre[Not]DecoratedWithOrInherit - #748
  • {New} Add support for unsigned types and sbyte - #750

5.0.0-rc.2

12 Jan 08:10
cdaa502
Compare
Choose a tag to compare

Changes since RC1:

  • {New} Added an overload of BeEquivalentTo that takes a params array - #733
  • {New} Added BeDecoratedWithOrInherit and NotBeDecoratedWithOrInherit for type assertions - #727
  • {Fix} The auto-conversion rules were not always honored correctly - #733
  • {Fix} Update the assembly versions based on Gitversion - #733
  • {Fix} Ensured that numbers of different types (e.g. long vs int) are still seen as equivalent - #733
  • {Fix} The equivalency report contained an empty line if no conversion was specified.

Notable contributions by @MJLHThomassen-Eurocom

5.0.0-rc.1

08 Jan 18:19
4dda1dc
Compare
Choose a tag to compare
  • {New} Include the name of the subject-under-test from the C# code in the failure message - #705
  • {New} Include the missing and superfluous item keys when comparing dictionaries - #723
  • {New} Downgraded the minimum targeted full .NET Framework from 4.5.1 to 4.5 - #722
  • {Breaking} Change the extension methods for specifying milliseconds and nanoseconds to plural names - #703
  • {Fix} Improved DateTime formatting for near-zero values - #695
  • {Fix} Improved thread-safety of the Configuration class - #714
  • {Fix} Ignore double braces in failure messages - #715
  • {Fix} Better messages when comparing empty collections - #719
  • {Fix} Several performance improvements - #725

Credits for major contributions go to @jnyrup, @krajek

5.0.0-beta.4

19 Nov 18:41
Compare
Choose a tag to compare
  • {New} Added more TimeSpan conversions - #650
  • {New} Added TimeSpan extensions for micro and nano seconds - #669
  • {Fix} Added proper formatting of Task and Task - #651
  • {Fix} Chaining Where on WithInnerExceptionExactly should work on the correct type - #656
  • {Fix} BeDataContractSerializable didn't allow customizing the comparison - #667
  • {Fix} Improved formatting for more precise DateTime, DateTimeOffset, and TimeSpans - #669
  • {Fix} When comparing two Types who both happens to be null, NotBe() and Be() should still work as expected - #672
  • {Fix} Include generic type in failure message - #691
  • {Breaking} Align ExecutionTime[Of] with the rest of the v5.0.0 API by using Should() to assert - #653
  • {Breaking} Removed WithInnerMessage as chaining WithInnerException with WithMessag gives the same result - #666
  • {Breaking} Moved DateTime & Timespan construction to the 'Extensions' namespace - #675

Notable contributors for this release include @jnyrup, @alexangas, @bcowdery and @ChristopherHaws

5.0.0-beta.3

04 Oct 19:46
Compare
Choose a tag to compare
5.0.0-beta.3 Pre-release
Pre-release

Compared to 5.0 beta 2, the following has changed.

  • {New} Added various examples to the docs on migrating from MSTest and tips for improved assertions - #614
  • {Changed} Relaxing the constructor for type selectors - #644
  • {Changed} Constrained the generic parameter of ThatAreDecoratedWith to attributes - #642
  • {Breaking} Changed Should[Not]Throw() to Should().[Not]Throw in order align all APIs - #648
  • {Breaking} Changed the IValueFormatter contract to better support cyclic reference detection (#649)

5.0.0-beta.2

18 Sep 05:14
Compare
Choose a tag to compare
5.0.0-beta.2 Pre-release
Pre-release

Compared the beta 1, the following changes have been made.

  • {New} Added string.ContainAllOf and string.ContainAnyOf to verify a string against a collection of strings - #633
  • {Breaking} Replaced the old thread-unsafe MonitorEvents API with a new Monitor extension method that will return a thread-safe monitoring scope that exposes methods like Should().Raise() and metadata such as OccurredEvents and MonitoredEvents - #625

5.0.0-beta.1

25 Aug 19:27
Compare
Choose a tag to compare
5.0.0-beta.1 Pre-release
Pre-release
  • {Breaking} Unified ShouldBeEquivalentTo, ShouldAllBeEquivalentTo and collection.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 API WithAutoConversion instead - #616
  • {New} Supports .NET 4.5.1, .NET Standard 1.3, 1.6 and 2.0
  • {New} Added NotBeInRange, NotHaveSameCount, NotApproximately, NotBeAssignableTo to the numeric assertions - #598, #599, #600, #601
  • {New} Added [Not]Have{Implicit,Explicit}ConversionOperator, NotBeDecoratedWith and ThatAreNotDecoratedWith 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 and NotContainNull collection assertions - #611
  • {New} Fail fast on NotIntersectWith, NotBeSubsetOf, NotHaveSameCount ,NotBeEquivalentTo - #610
  • {New} Added BeCloseTo with TimeSpan - #621
  • {New} Added missing/negations type assertions/selectors - #620
  • {New} Added HaveCount variants for generic collections - #623
  • {Changed} Fail fast ReferenceEquals on NotEqual (#606)
  • {Changed} Report all non-duplicate keys in collection.Should().OnlyHaveUniqueItems - #607