Skip to content
master
Go to file
Code

Latest commit

…#34)

* Add net461 target to work around ValueTuple missing method exceptions

See dotnet/standard#567 for context here.
I ran into this while using `SetComparison.Compare(...)` which is all public DeepEquals API. This manifests itself like so:
```c#
	[{System.MissingMethodException}: 'Method not found: 'System.ValueTuple`2<DeepEqual.ComparisonResult,DeepEqual.IComparisonContext> DeepEqual.SetComparison.Compare(DeepEqual.IComparisonContext, System.Object, System.Object)'.']
```
a944292

Git stats

Files

Permalink
Failed to load latest commit information.

Readme.md

DeepEqual

DeepEqual is an extensible deep equality comparison library.

Installing

Install via NuGet

Install-Package DeepEqual

Usage

To test equality simply call the IsDeepEqual extension method.

bool result = object1.IsDeepEqual(object2);

When used inside a test you might want to call ShouldDeepEqual instead. This method throws an exception with a detailed description of the differences between the 2 objects.

object1.ShouldDeepEqual(object2);

You can pass a custom comparison as the second argument to the ShouldDeepEqual method to override the default behaviour. You can also customize the behaviour inline using the WithDeepEqual extension method.

object1.WithDeepEqual(object2)
       .SkipDefault<MyEntity>()
       .IgnoreSourceProperty(x => x.Id)
       .Assert()

About

An extensible deep comparison for .NET

Topics

Resources

License

Releases

No releases published

Languages

You can’t perform that action at this time.