Smooth your .NET TDD experience with NFluent! NFluent is an ergonomic assertion library which aims to fluent your .NET TDD experience (based on simple Check.That() assertion statements). NFluent aims your tests to be fluent to write (with a super-duper-happy 'dot' auto-completion experience), fluent to read (i.e. as close as possible to plain English expression), but also fluent to troubleshoot, in a less-error-prone way comparing to the classical .NET test frameworks. NFluent is also directly inspired by the awesome Java FEST Fluent assertion/reflection library (http://fest.easytesting.org/)
[ ] a check failed to detect an error (false negative), i.e. a test is green while it should be red.
[ ] a check raised un existing error (false positive), i.e a test is red while it should be green.
[ ] an error message is invalid/incomplete (please provide samples)
[x] a ran into an exception.
[ ] other.
Describe the bug
I'm getting this exception when my test fail (in Verifies scope)
System.FormatException
Input string was not in a correct format.
at System.Text.StringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ReadOnlySpan`1 args)
at System.Text.StringBuilder.AppendFormat(String format, Object arg0, Object arg1)
at NFluent.Extensibility.FluentMessage.ToString()
at NFluent.Kernel.CheckLogic`1.EndCheck()
at NFluent.CheckMember`2.Verifies(Action`1 func)
public class MyEntity
{
}
public class MyExample
{
public object Value { get; init; }
}
var value = new MyExample
{
Value = new List<MyEntity>()
};
// Assert
Check.That(value).IsInstanceOf<MyExample>()
.Which
.WhichMember(x => x.Value)
.Verifies(x =>
{
x.IsNull();
});
Expected behavior
I expected it toshow me explicitly what's the problem instead of a FormatException
Desktop (please complete the following information):
Hi
I did publish V3.0.2.327-beta that contains the fix. Could you please test it and report ? if the problem is fixed, I will publish an official release.
Bug Type Please pick one:
Describe the bug I'm getting this exception when my test fail (in Verifies scope)
To Reproduce
Expected behavior I expected it toshow me explicitly what's the problem instead of a FormatException
Desktop (please complete the following information):