I've searched everywhere for some examples on how to get this jazz
working and I can't find anything. Can someone help me with the
rollback attribute in particular? Here's what I've been trying. It
updates fine but it doesn't roll it back. I'm running Windows Server
2003 and VS.NET 2005.
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using MbUnit.Core.Framework;
using MbUnit.Framework;
namespace WebsiteTest
{
[TestFixture]
class DBTest
{
[Test, RollBack]
public void GetPage()
{
string connectionString =
"Server=localhost;Database=databaseName;User
ID=userID;Password=password";
System.Data.SqlClient.SqlConnection DbConnection = new
System.Data.SqlClient.SqlConnection(connectionString);
string sqlCommand =
"UPDATE pageinfo SET displayname='Less Sucky Page6';";
IDbCommand dataCommand = DbConnection.CreateCommand();
dataCommand.CommandText = sqlCommand;
DbConnection.Open();
dataCommand.ExecuteNonQuery();
DbConnection.Close();
Assert.IsTrue(1 == 1);
}
}
}