Example #1
0
        public void Dispose_LeavesSafePropertiesInTheCorrectState()
        {
            var subject = new SmallBlockMemoryStream();

            subject.Dispose();

            subject.Should().BeEquivalentTo(new
            {
                CanRead  = false,
                CanSeek  = false,
                CanWrite = false,
            });

            subject.GetAllocationSizes().Should().BeEquivalentTo(NoAllocations);
        }