Skip to content

jrwpatterson/DeepEqual

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 94.1%
  • Visual Basic .NET 5.8%
  • Batchfile 0.1%