예제 #1
0
        public void Buffer_factory_must_produce_FixedSizeBuffers_when_MaxFixedBufferSize_lower_than_BoundedBufferSize()
        {
            var settings = Default.WithMaxFixedBufferSize(9);

            Buffer.Create <int>(5, settings).Should().BeOfType <ModuloFixedSizeBuffer <int> >();
            Buffer.Create <int>(10, settings).Should().BeOfType <ModuloFixedSizeBuffer <int> >();
            Buffer.Create <int>(16, settings).Should().BeOfType <PowerOfTwoFixedSizeBuffer <int> >();
        }
예제 #2
0
 public void Buffer_factory_must_produce_FixedSizeBuffers_when_capacity_lower_than_MaxFixedBufferSize()
 {
     Buffer.Create <int>(1000, Default).Should().BeOfType <ModuloFixedSizeBuffer <int> >();
     Buffer.Create <int>(1024, Default).Should().BeOfType <PowerOfTwoFixedSizeBuffer <int> >();
 }
예제 #3
0
 public void Buffer_factory_must_produce_BoundedBuffers_when_capacity_greater_than_MaxFixedBufferSize()
 {
     Buffer.Create <int>(int.MaxValue, Default).Should().BeOfType <BoundedBuffer <int> >();
 }