Table of Contents

Interface ITestCase

Namespace
Xunit.Sdk

Represents a single test case in the system. This test case usually represents a single test, but in the case of dynamically generated data for data driven tests, the test case may actually return multiple results when run.

public interface ITestCase : ITestCaseMetadata
Inherited Members
Extension Methods

Properties

TestClass

Gets the test class that this test case belongs to; may be null if the test isn't backed by a class, but will not be null if TestMethod is not null (and must be the same instance returned via TestMethod).

ITestClass? TestClass { get; }

Property Value

ITestClass

TestCollection

Gets the test collection this test case belongs to. Must be the same instance returned via TestMethod and/or TestClass when they are not null.

ITestCollection TestCollection { get; }

Property Value

ITestCollection

TestMethod

Gets the test method this test case belongs to; may be null if the test isn't backed by a method.

ITestMethod? TestMethod { get; }

Property Value

ITestMethod