Customizing Database Unit Tests in Visual C# or Visual Basic
This documentation is archived and is not being maintained.

Customizing Database Unit Tests in Visual C# or Visual Basic

Visual Studio 2005

By using the Database Unit Test Designer, you can configure your database unit test in simple ways, such as adding Transact-SQL (T-SQL) script and test conditions. At that point, you can run the test and obtain results.

If you want it to perform more advanced tasks, you can customize your test code. For example, you can test a wider range of database objects and use Assert statements in a more precise way. By customizing your test, you can also use the Assert statements that the Unit Testing Framework provides.

In This Section

How to: Open a Database Unit Test to Edit

Describes how to open database unit tests for editing.

How to: Add a Test Condition to Database Unit Test Designer

The TestCondition class from which all test conditions inherit is extensible. This topic explains how to create a new test condition that will display in the Database Unit Test Designer.

How to: Register a New Test Condition

Explains how to register a new test condition so that it is available in the Database Unit Test Designer.

How to: Write a Database Unit Test that Runs within the Scope of a Single Transaction

Explains how to rollback a unit testing change using T-SQL or coded transaction.

Reference

Microsoft.VisualStudio.TestTools.UnitTesting

The API reference for the namespace whose attributes, asserts, and other classes provide support for unit testing.

Related Sections

Designing Database Unit Tests

Describes how to create a basic database unit test in the Database Unit Test Designer.

Using the Assert Classes

Describes how you can use the Assert classes in the Microsoft.VisualStudio.TestTools.UnitTesting namespace to verify specific functionality of the code that you are testing.

Unit Testing Framework

Describes how you can use the classes and members in the Microsoft.VisualStudio.TestTools.UnitTesting namespace for coding unit tests.

Running Database Unit Tests

Describes how you can run database unit tests and interpret the results.

Terminology Overview of Team Edition for Database Professionals

Provides definitions of terms that are specific to Team Edition for Database Professionals and contains a link to definitions for terms that relate to Visual Studio Team System.

Show:
© 2016 Microsoft