NUINT Test the TestCase of the database operation, a problem is how to recover database data after the test, and one way to see online is to use the transaction rollback.
Mainly using the following code
Using system;
Using nunit.framework;
Using system.enterprises;
Namespace TransactionTesting
{
[TestFixTure]
[Transaction (TransactionOption.Required)]
Public Class DatabaseFixTure: ServicesDComponent
{
[Teardown]
Public void Transactionteardown ()
{
ContextUtil.isintransaction
{
Contextutil.Setabort ();
}
}
}
}