public void AppendFill_Should_Throw_On_Non_Positive_Count(int count) { var buffer = new BoundedBuffer(); buffer.Invoking(b => b.AppendFill(Helpers.EmptyBuffer, 0, count)) .ShouldThrow <ArgumentOutOfRangeException>(); }
public void AppendFill_Should_Throw_On_Bad_Segment_Length() { var buffer = new BoundedBuffer(); buffer.Invoking(b => b.AppendFill(Helpers.EmptyBuffer, 0, 1)) .ShouldThrow <ArraySegmentException>(); }
public void AppendFill_Should_Throw_On_Negative_Offset() { var buffer = new BoundedBuffer(); buffer.Invoking(b => b.AppendFill(Helpers.EmptyBuffer, -1, 0)) .ShouldThrow <ArgumentOutOfRangeException>(); }
public void AppendFill_Should_Throw_On_Null_Buffer() { var buffer = new BoundedBuffer(); buffer.Invoking(b => b.AppendFill(null, 0, 0)) .ShouldThrow <ArgumentNullException>(); }
public void ExtractAndReset_With_Zero_Capacity_Should_Not_Throw() { var buffer = new BoundedBuffer(32); buffer.Invoking(b => b.ExtractAndReset(0)) .ShouldNotThrow(); }
public void AppendFill_Should_Throw_After_Disposal() { var buffer = new BoundedBuffer(32); buffer.Dispose(); buffer.Invoking(b => b.AppendFill(Helpers.EmptyBuffer, 0, 0)) .ShouldThrow <ObjectDisposedException>(); }
public void Reset_Should_Throw_After_Disposal() { var buffer = new BoundedBuffer(32); buffer.Dispose(); buffer.Invoking(b => b.Reset(0)) .ShouldThrow <ObjectDisposedException>(); }
public void FreeSpace_Access_Should_Throw_After_Disposal() { var buffer = new BoundedBuffer(32); buffer.Dispose(); buffer.Invoking(b => b.FreeSpace.Whatever()) .ShouldThrow <ObjectDisposedException>(); }
public void Double_Dispose_Should_Not_Throw() { var buffer = new BoundedBuffer(32); buffer.Dispose(); buffer.Invoking(b => b.Dispose()) .ShouldNotThrow(); }
public void Reset_With_Zero_Capacity_Should_Not_Throw() { var buffer = new BoundedBuffer(32); buffer.Invoking(b => b.Reset(0)) .ShouldNotThrow(); }
public void Reset_Should_Throw_On_Negative_Capacity() { var buffer = new BoundedBuffer(32); buffer.Invoking(b => b.Reset(-1)) .ShouldThrow<ArgumentOutOfRangeException>(); }
public void Reset_Should_Throw_After_Disposal() { var buffer = new BoundedBuffer(32); buffer.Dispose(); buffer.Invoking(b => b.Reset(0)) .ShouldThrow<ObjectDisposedException>(); }
public void FreeSpace_Access_Should_Throw_After_Disposal() { var buffer = new BoundedBuffer(32); buffer.Dispose(); buffer.Invoking(b => b.FreeSpace.Whatever()) .ShouldThrow<ObjectDisposedException>(); }
public void Double_Dispose_Should_Not_Throw() { var buffer = new BoundedBuffer(32); buffer.Dispose(); buffer.Invoking(b => b.Dispose()) .ShouldNotThrow(); }
public void AppendFill_Should_Throw_On_Null_Buffer() { var buffer = new BoundedBuffer(); buffer.Invoking(b => b.AppendFill(null, 0, 0)) .ShouldThrow<ArgumentNullException>(); }
public void AppendFill_Should_Throw_On_Non_Positive_Count(int count) { var buffer = new BoundedBuffer(); buffer.Invoking(b => b.AppendFill(Helpers.EmptyBuffer, 0, count)) .ShouldThrow<ArgumentOutOfRangeException>(); }
public void AppendFill_Should_Throw_After_Disposal() { var buffer = new BoundedBuffer(32); buffer.Dispose(); buffer.Invoking(b => b.AppendFill(Helpers.EmptyBuffer, 0, 0)) .ShouldThrow<ObjectDisposedException>(); }
public void AppendFill_Should_Throw_On_Bad_Segment_Length() { var buffer = new BoundedBuffer(); buffer.Invoking(b => b.AppendFill(Helpers.EmptyBuffer, 0, 1)) .ShouldThrow<ArraySegmentException>(); }
public void AppendFill_Should_Throw_On_Negative_Offset() { var buffer = new BoundedBuffer(); buffer.Invoking(b => b.AppendFill(Helpers.EmptyBuffer, -1, 0)) .ShouldThrow<ArgumentOutOfRangeException>(); }