tpierrain/NFluent

Error messages for checks on dynamic may be wrong

Closed this issue · 0 comments

Due to language constraints on dynamics, related error messages were asserted during tests, never were refactored and were never properly reviewed and may be erroneous for some cases

Expected Behavior

Provide correct and helpful error messages on dynamic.

Current Behavior

Some messages are misleading, especially when using Not.

Possible Solution

Review code and tests.

Code that reproduce the issue

....
Check.ThatDynamic(sut).Not.IsSameReferenceAs(sut)
...

Raises

The checked dynamic is the expected reference whereas it must not.
The checked dynamic:
    ["test"]
The expected dynamic:
    ["test"]