-
Notifications
You must be signed in to change notification settings - Fork 731
Closed
Labels
Description
Description
BeEquivalentTo shows enums as decimal in error message
public enum Color
{
Red,Blue
}Expected member Color to be 1M, but found 0M.
Complete minimal example reproducing the issue
public enum Color
{
Red,Blue
}
public class Car
{
public Color Color { get; set; }
}
[Fact]
public void Test()
{
var car = new Car
{
Color = Color.Red
};
car.Should().BeEquivalentTo(new Car() { Color = Color.Blue });
}Expected behavior:
Message: Expected member Color to be Blue, but found Red.
Actual behavior:
Message: Expected member Color to be 1M, but found 0M.
Versions
- FluentAssertions 5.4.1
- .NET Core 2.0
Additional Information
Running in Xunit, when relevant.