You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to gets actual/expected instance data when xUnit assertion failed.
And report custom diffs as test attachments.
Currently it need to add try-catch block capture these information.
So I want extensibility point to hook assertion failure event.
Expected Usage
publicclassReportDiffOnFailedAttribute:BeforeAfterTestAttribute{publicoverridevoidBefore(MethodInfomethodUnderTest,IXunitTesttest){// Add custom hook that is ivoked when assertion failedTestContext.Current.OnAssertionFailed=(stringassertionName,object?actual,object?expected)=>{// Generate actual/expected diffs and add results to attachments.};}}
I want to gets
actual
/expected
instance data when xUnit assertion failed.And report custom diffs as test attachments.
Currently it need to add try-catch block capture these information.
So I want extensibility point to hook assertion failure event.
Expected Usage
Similar Issues
The text was updated successfully, but these errors were encountered: