public void When_DbIsDisposed_BufferedItems_GetWritten() { for (var i = 0; i < BufferSize - 1; i++) { _db.Insert(i, i); } _db.Dispose(); _mockDb.InsertedData.Count().Should().Be(BufferSize - 1); }
public void Dispose() { _mockDb.Disposed .Should().BeFalse(); _db.Dispose(); _mockDb.Disposed .Should().BeTrue(); // be at least one _mockDb.Inserts .Should().BeGreaterOrEqualTo(1); }