Я конвертирую следующий код из MSTest V2 в NUnit 3. Можете ли вы помочь мне найти альтернативы CurrentTestOutcome и UnitTestOutcome в NUnit?
var status = MyTestContext.CurrentTestOutcome;
switch (status)
{
case UnitTestOutcome.Failed:
TheLogger.Error($"Test Failed => {MyTestContext.FullyQualifiedTestClassName}");
CurrentTestCase.AddScreenCaptureFromPath(screenshotPath);
CurrentTestCase.Fail("Fail");
break;
case UnitTestOutcome.Inconclusive:
CurrentTestCase.AddScreenCaptureFromPath(screenshotPath);
CurrentTestCase.Warning("Inconclusive");
break;
case UnitTestOutcome.Unknown:
CurrentTestCase.Skip("Test skipped");
break;
default:
CurrentTestCase.Pass("Pass");
break;
}
Я переключаюсь в зависимости от текущего результата теста. Я обнаружил, что MyTestContext.Result.Outcome является альтернативой для MyTestContext.CurrentTestOutcome в NUnit, но что будет альтернативой для UnitTestOutcome.Inconclusive и т. Д. В NUnit? спасибо