Skip to content

Confusing CallStack when using Fluent Assertions #512

@naveek

Description

@naveek

Using MsTest Assert I have this call stack.

   Assert.AreEqual failed. Expected:<4>. Actual:<5>. 
   at Foo.Bar() in c:\Foo\Bar.cs:line 38

Using Fluent Assertions I see this

Expected value to be 4, but found 5.
   at FluentAssertions.Execution.LateBoundTestFramework.Throw(String message) in z:\Builds\work\eed5b735bfe0fb8d\Shared\Execution\LateBoundTestFramework.cs:line 30
   at FluentAssertions.Execution.AssertionScope.FailWith(String message, Object[] args) in z:\Builds\work\eed5b735bfe0fb8d\FluentAssertions.Core\Execution\AssertionScope.cs:line 197
   at FluentAssertions.Numeric.NumericAssertions`1.Be(T expected, String because, Object[] reasonArgs) in z:\Builds\work\eed5b735bfe0fb8d\FluentAssertions.Core\Numeric\NumericAssertions.cs:line 49
   at Foo.Bar() in c:\Foo\Bar.cs:line 36

Is there a way where we don't get the complete call stack that includes FluentAssertions since it is confusing compared to simple MSTest Asserts?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions