public void TestTransactFail() { SharedMemoryStream shared = new SharedMemoryStream(); FragmentedFile.CreateNew(shared, 512, 100, 2).Dispose(); using (FragmentedFile ff = new FragmentedFile(shared, 512, 100, 2)) { long id; byte[] bytes = MakeBytes(255); using (Stream write = ff.Create(out id)) using (ITransactable trans = (ITransactable)write) { write.Write(bytes, 0, bytes.Length); ff.Dispose(); trans.Commit(); } } }