Frequently Used Methods
Frequently Used Methods
Frequently Used Methods
Frequently Used Methods
public void cleanup_cancels_all_transactions() { var firstIsRolledback = false; var secondIsRolledback = false; var sut = new TransactionManager(); sut.Begin("abd"); sut.Enqueue("abd", () => { }, delegate { firstIsRolledback = true; }); sut.Begin("abc"); sut.Enqueue("abc", () => { }, delegate { secondIsRolledback = true; }); sut.Cleanup(); firstIsRolledback.Should().BeTrue(); secondIsRolledback.Should().BeTrue(); }