public void GetMemory_ShouldThrow_WhenDisposed() { var buffer = new byte[1]; var simpleOwner = new FakePoolOwner <byte>(buffer, 1); simpleOwner.Dispose(); Assert.Throws <ObjectDisposedException>(() => simpleOwner.Memory); }
public void Dispose_ShouldCallReturnToPool() { var buffer = new byte[1]; var simpleOwner = new FakePoolOwner <byte>(buffer, 1); simpleOwner.Dispose(); simpleOwner.VerifyReturnToPool(); }
public void Ctor_ShouldRun_WhenLengthIsLesserOrEqualThanBufferLen() { var buffer = new byte[1]; var owner = new FakePoolOwner <byte>(buffer, 1); }