Table of Contents

Method FromException

Namespace
Xunit
Assembly
xunit.v3.core.dll

FromException(decimal, Exception?)

Creates an instance based on the presence or absence of an exception. If the exception is null, then it will be for Passed; otherwise, it will be for Failed;

public static TestResultState FromException(decimal executionTime, Exception? exception)

Parameters

executionTime decimal

The time spent executing the test

exception Exception

The exception, if the test failed

Returns