Freigeben über


Microsoft.SpecExplorer.Runtime.Testing Namespace

The Microsoft.SpecExplorer.Runtime.Testing namespace contains types that are used to execute test cases generated by Spec Explorer.

The GeneratedTestClassBase class serves as the base class for all generated test classes. The VsTestClassBase class, which derives from the GeneratedTestClassBase class, serves as the base class for test classes intended to be executed under Visual Studio.

This namespace also contains classes that represent concepts such as a test failed exception, an event queue, and a test manager, and some interfaces related to the test runtime. To create a customized test site, test class, or test manager, implement these interfaces.

Classes

Class Description
DefaultTestManager Supervises the process in which the test cases run and also provides logging and checking functions for test cases. The test manager supports the test case code generated by Spec Explorer.
GeneratedTestClassBase Provides an abstract base class for test classes generated by Spec Explorer.
ObservationQueue Represents a thread-safe first-in, first-out observation queue for observed steps in the system under test. This class supports the testing infrastructure and is not intended to be used directly from your code.
TestAdapterAttribute Represents a test adapter. This class supports the Spec Explorer test code infrastructure and is not intended to be used directly from your code.
TestFailureException The exception that is thrown when a test case assertion fails.
TestManagerHelpers Primarily, this class handles calls from the test case code generated by Spec Explorer.
TransactionFailedException An exception that is thrown when a transaction fails. This class supports the generated test cases and is not intended to be used directly from your code.
UnboundVariableException An exception that is thrown when a variable is read before it is bound to a variable in the system under test. This class supports the generated test cases and is not intended to be used directly from your code.
VsTestClassBase Provides a base class for test classes generated by Spec Explorer. Test classes generated from this class support the Visual Studio testing tools for unit tests.

Interfaces

Interface Description
IBasicTestSite Declares methods that the DefaultTestManager class calls to support basic reporting and logging functions.
IBypassingTestSite Defines a test site that bypasses assertion failures. This class supports the Spec Explorer infrastructure and is not intended to be used directly from your code.
IConfigurableGeneratedTestClass Represents a base class that supports dynamic traversal for test classes generated by Spec Explorer.
IGeneratedTestClass Represents a base class for test classes generated by Spec Explorer.
ITestManager Supervises the process in which the test cases run and also provides logging and checking functions for test cases. The test manager supports the test case code generated by Spec Explorer.
IVariable Represents a variable. This class supports the generated test cases and is not intended to be used directly from your code.

Structures

Structure Description
AvailableEvent Describes an event that was raised by the system under test. This structure supports the generated test cases and is not intended to be used directly from your code.
AvailableReturn Describes a method return from the system under test. This structure supports the generated test cases and is not intended to be used directly from your code.
ExpectedEvent Describes an event that a test expects from the system under test. This structure supports the generated test cases and is not intended to be used directly from your code.
ExpectedPreConstraint Describes a preconstraint of a transition. This structure supports the generated test cases and is not intended to be used directly from your code.
ExpectedReturn Describes a method return that a test expects from the system under test. This structure supports the generated test cases and is not intended to be used directly from your code.