Freigeben über


Microsoft.VisualStudio.TestTools.UnitTesting Namespace

Classes

AfterAssemblyCleanupEventArgs
AfterAssemblyInitializeEventArgs
AfterClassCleanupEventArgs
AfterClassInitializeEventArgs
AfterTestCleanupEventArgs
AfterTestInitializeEventArgs
AssemblyCleanupAttribute

The assembly cleanup attribute.

AssemblyInitializeAttribute

The assembly initialize attribute.

Assert

A collection of helper classes to test various conditions within unit tests. If the condition being tested is not met, an exception is thrown.

AssertFailedException

AssertFailedException class. Used to indicate failure for a test case

AssertInconclusiveException

The assert inconclusive exception.

BaseShadow
BeforeAssemblyCleanupEventArgs
BeforeAssemblyInitializeEventArgs
BeforeClassCleanupEventArgs
BeforeClassInitializeEventArgs
BeforeTestCleanupEventArgs
BeforeTestInitializeEventArgs
ClassCleanupAttribute

The class cleanup attribute.

ClassInitializeAttribute

The class initialize attribute.

CollectionAssert

A collection of helper classes to test various conditions associated with collections within unit tests. If the condition being tested is not met, an exception is thrown.

CssIterationAttribute

CSS Iteration URI

CssProjectStructureAttribute

CSS Project Structure URI

DataRowAttribute

Attribute to define in-line data for a test method.

DataSourceAttribute

Specifies connection string, table name and row access method for data driven testing.

DataSourceElement

The Data Source element.

DataSourceElementCollection

The Data source element collection.

DataTestMethodAttribute

Attribute for data driven test where data can be specified in-line.

DeploymentItemAttribute

Used to specify deployment item (file or directory) for per-test deployment. Can be specified on test class or test method. Can have multiple instances of the attribute to specify more than one item. The item path can be absolute or relative, if relative, it is relative to RunConfig.RelativePathRoot.

DescriptionAttribute

Description of the test

DoNotParallelizeAttribute

Specification to disable parallelization.

DynamicDataAttribute

Attribute to define dynamic data for a test method.

ExpectedExceptionAttribute

Attribute that specifies to expect an exception of the specified type

ExpectedExceptionBaseAttribute

Base class for attributes that specify to expect an exception from a unit test

GenericParameterHelper

This class is designed to help user doing unit testing for types which uses generic types. GenericParameterHelper satisfies some common generic type constraints such as:

  1. public default constructor
  2. implements common interface: IComparable, IEnumerable
HostTypeAttribute
IgnoreAttribute

The ignore attribute.

InternalTestFailureException

InternalTestFailureException class. Used to indicate internal failure for a test case

OnTestStoppingEventArgs
OwnerAttribute

Test Owner

ParallelizeAttribute

Specification for parallelization level for a test run.

PriorityAttribute

Priority attribute; used to specify the priority of a unit test.

PrivateObject

This class represents the live NON public INTERNAL object in the system

PrivateType

This class represents a private class for the Private Accessors functionality.

ShadowingAttribute
StringAssert

The string assert.

TestCategoryAttribute

TestCategory attribute; used to specify the category of a unit test.

TestCategoryBaseAttribute

Base class for the "Category" attribute

TestClassAttribute

The test class attribute.

TestClassExtensionAttribute
TestCleanupAttribute

The test cleanup attribute marks methods that are executed after every test marked with a TestMethodAttribute.

TestConfiguration

Support for configuration settings for Tests.

TestConfigurationSection

The configuration section for tests.

TestContext

Used to store information that is provided to unit tests.

TestExecution
TestExecutionEventArgs
TestExtensionExecution
TestInitializeAttribute

The test initialize attribute.

TestMethodAttribute

The test method attribute.

TestMethodInvokerContext
TestMethodInvokerResult
TestPropertyAttribute

The test property attribute.

TimeoutAttribute

Timeout attribute; used to specify the timeout of a unit test.

UnitTestAssertException

Base class for Framework Exceptions.

WebServiceHelper
WorkItemAttribute

WorkItem attribute; used to specify a work item associated with this test.

Interfaces

ITestDataSource

Test data source for data driven tests.

ITestMethod

TestMethod for execution.

ITestMethodInvoker

Enums

DataAccessMethod

Enumeration for how we access data rows in data driven testing.

DynamicDataSourceType

Enum to specify whether the data is stored as property or in method.

ExecutionScope

Parallel execution mode.

InheritanceBehavior

Enumeration for inheritance behavior, that can be used with both the ClassInitializeAttribute class and ClassCleanupAttribute class. Defines the behavior of the ClassInitialize and ClassCleanup methods of base classes. The type of the enumeration must match

TestTimeout

Enumeration for timeouts, that can be used with the TimeoutAttribute class. The type of the enumeration must match

UnitTestOutcome

unit test outcomes

Delegates

BaseShadow.ElementConverter