Closed inyutin-maxim closed 2 years ago
Can you provide a repro? What is the error message?
A simple repro works on my side:
// Nunit
var groups = new[] { new { IsMember = true } };
Assert.That(groups[0].IsMember, Is.True);
// FluentAssertions
var groups = new[] { new { IsMember = true } };
groups[0].IsMember.Should().BeTrue();
Can you provide a repro? What is the error message?
A simple repro works on my side:
// Nunit var groups = new[] { new { IsMember = true } }; Assert.That(groups[0].IsMember, Is.True);
// FluentAssertions var groups = new[] { new { IsMember = true } }; groups[0].IsMember.Should().BeTrue();
Hi @meziantou Your example works correctly because you have a Boolean field defined as non nullable, in my example the IsMember property is defined as nullable
Fixed by f4b6bc8fdca90e8fa57bf0f0f2801450e2760fb9
I have assertion:
Where the property
IsMember
is declared as nullable booleancan be convert to:
but convertion does not work