Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions Simple.Data.SqlTest/TransactionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,27 @@ public void TestRollback()
Assert.AreEqual(1, db.OrderItems.All().ToList().Count);
}

[Test, Ignore("TODO: fix transactions?")]
public void TestRollbackOnProcedureWithSpecifiedSchema()
{
var db = DatabaseHelper.Open();

int customerId;
using (var tx = db.BeginTransaction())
{
var customer = tx.dbo.CreateCustomer().FirstOrDefault();
customerId = customer.CustomerId;

var customerBeforeRollback = db.Customers.FindByCustomerId(customerId);
Assert.IsNotNull(customerBeforeRollback);

tx.Rollback();
}

var customerAfterRollback = db.Customers.FindByCustomerId(customerId);
Assert.IsNull(customerAfterRollback);
}

[Test]
public void TestWithOptionsTransaction()
{
Expand Down