I agree this is confusing. Should().BeEquivalentTo()
should actually be called Should().EqualInAnyOrder()
or something like that. As you said, it uses the Equals
implementation of the involved objects to see if all of the ones in the expected
collection appear in the actual
collection, regardless of order. I’ll need to fix that for the next major version.
Related Contents:
- Comparing two strings, ignoring case in C# [duplicate]
- Compare two List objects for equality, ignoring order [duplicate]
- Differences in string compare methods in C#
- Why C# fails to compare two object types with each other but VB doesn’t?
- C# vs Java generics [duplicate]
- Why does this string extension method not throw an exception?
- LINQ Distinct operator, ignore case?
- Comparing object properties in c# [closed]
- Protocol Buffers versus JSON or BSON [closed]
- Testing for exceptions in async methods
- Why does >= return false when == returns true for null values?
- How to use Exclude in FluentAssertions for property in collection?
- Most performant way of checking empty strings in C# [closed]
- extract the date part from DateTime in C# [duplicate]
- Are there any Fuzzy Search or String Similarity Functions libraries written for C#? [closed]
- Comparing two List for equality
- How to properly compare decimal values in C#?
- What is the correct way to compare char ignoring case?
- FluentAssertions: equivalence of sorted lists
- How to use Fluent Assertions to test for exception in inequality tests?
- C# implementation of deep/recursive object comparison in .net 3.5
- What is “Best Practice” For Comparing Two Instances of a Reference Type?
- What is the fastest way I can compare two equal-size bitmaps to determine whether they are identical?
- Equality comparison between multiple variables
- Serialize an object to XML
- How can I fix the Microsoft Visual Studio error: “package did not load correctly”?
- Setting the filter to an OpenFileDialog to allow the typical image formats?
- Max return value if empty query
- How to implement a rule engine?
- Accessing MVC’s model property from Javascript
- Breakpoint Failed to Bind – Visual Studio 2015
- How do I jump out of a foreach loop in C#?
- Inherit from a generic base class, apply a constraint, and implement an interface in C#
- Why is Thread.Sleep so harmful
- Why is stack size in C# exactly 1 MB?
- Send Email to multiple Recipients with MailMessage?
- Unrecognized escape sequence for path string containing backslashes
- Is the sorting algorithm used by .NET’s `Array.Sort()` method a stable algorithm?
- Should “Dispose” only be used for types containing unmanaged resources?
- How to touch a file in C#?
- What is the purpose of the extra braces in Switch case?
- Views in separate assemblies in ASP.NET MVC
- Error Deserializing Xml to Object – xmlns=” was not expected
- Regex pattern for checking if a string starts with a certain substring?
- Is it possible to use ref types in C# built-in Action delegate?
- TextInfo.ToTitleCase does not work as expected for ALL CAPS strings
- Mixed mode assembly is built against version ‘v1.1.4322’
- How can I read user input from the console?
- Programmatically get C# Stack Trace [duplicate]
- How to add new DataRow into DataTable?