I want to empty/ remove all details packed in 'TestContext.CurrentContext.Result.Assertions'.
How can I do the same ? Pls. guide.
I want to empty/ remove all details packed in 'TestContext.CurrentContext.Result.Assertions'.
How can I do the same ? Pls. guide.
Try this code, this test should pass with last 2 lines.
try
{
Assert.True(1 == 2);
}
catch
{
}
var context = TestExecutionContext.CurrentContext;
context.CurrentResult = context.CurrentTest.MakeTestResult();