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> >(); }
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> >(); }
public void Buffer_factory_must_produce_BoundedBuffers_when_capacity_greater_than_MaxFixedBufferSize() { Buffer.Create <int>(int.MaxValue, Default).Should().BeOfType <BoundedBuffer <int> >(); }