Abstract base class for MSSQL server database testing.
Namespace:
TestFu.Data.SqlClientAssembly: TestFu (in TestFu.dll) Version: 2.4.2.1515 (2.4.2.1515)
Syntax
Examples
The DbFixture (SqlFixture for MsSQL server) can be used as a base class for the fixtures involving database testing.
[TestFixture] public class DatabaseTest : SqlFixture { public DatabaseTest() :base("Data Source=testserver;...","MyTestDatabase") {} [SetUp] public void SetUp() { this.Open(); this.BeginTransaction(); } [Test] public void Selec() { IDbCollection cmd = this.Connection.CreateCommand("select * from anytable",this.Transaction); ... } [TearDown] public void TearDown() { this.Close(); } }
