We recommend using Visual Studio 2017
This documentation is archived and is not being maintained.

Microsoft.Data.Schema.UnitTesting Namespace

The Microsoft.Data.Schema.UnitTesting namespace provides classes that you can use to create and execute database unit tests. You can add custom assertions to determine the success or failure of your tests.

Public classConnectionContextRepresents the context for the database connection that is associated with the database unit test.
Public classDatabaseTestActionRepresents a set of Transact-SQL batch statements and test conditions to validate whether the statement executed correctly.
Public classDatabaseTestActionsRepresents a database unit test.
Public classDatabaseTestClassRepresents the base class for a database unit test.
Public classDatabaseTestServiceProvides common functionality that is used by the DatabaseTestClass and methods during test execution.
Public classExecutionResultContains the results of a database unit test that were generated by calling Execute(ConnectionContext, String, DbParameter[]).
Public classExpectedSqlExceptionAttributeRepresents an attribute that specifies that a unit test is expecting a SqlException, and optionally specify the error number, severity, and state of the expected error.
Public classTestScriptRepresents a generated SQL test.
Public classUnitTestingDesignServiceProvides the base class for database schema providers to generate scripts for objects in their project system. This class is not intended to be implemented except as part of the implementation of a database schema provider.