Created
June 15, 2020 10:53
-
-
Save GeeWee/9f3886b9db97efeebe1e0cbe0d87d443 to your computer and use it in GitHub Desktop.
FluentAssertions ShouldBeEquivalentTo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using FluentAssertions; | |
using Xunit; | |
namespace AIP.FastlogFG.Test | |
{ | |
public class FooTest | |
{ | |
[Fact] | |
public void foo() | |
{ | |
// Arrange | |
var foos = new List<Foo> | |
{ | |
new Foo() | |
{ | |
Name = "test" | |
} | |
}; | |
var bars = new List<Bar> | |
{ | |
new Bar() | |
{ | |
Name = "test" | |
} | |
}; | |
foos.Should().BeEquivalentTo(bars); | |
} | |
} | |
public class Foo | |
{ | |
public string Name { get; set; } = ""; | |
} | |
public class Bar | |
{ | |
public string Name { get; set; } = ""; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment