public virtual void TestGrowth() { MemoryIoAdapter factory = new MemoryIoAdapter(); factory.GrowBy(GrowBy); IoAdapter io = factory.Open(Url, false, 0, false); AssertLength(factory, 0); WriteBytes(io, GrowBy - 1); AssertLength(factory, GrowBy); WriteBytes(io, GrowBy - 1); AssertLength(factory, GrowBy * 2); WriteBytes(io, GrowBy * 2); AssertLength(factory, GrowBy * 4 - 2); }
private void AssertLength(MemoryIoAdapter factory, int expected) { Assert.AreEqual(expected, factory.Get(Url).Length); }