override public void Run() { BufferChunk bc = new BufferChunk(new byte[]{1, 2, 3}, 1, 2); bc.Reset(2, 1); if(bc.Length != 1) { throw new TestCaseException("unexpected length"); } }
override public void Run() { BufferChunk bc = new BufferChunk(new byte[]{1, 2, 3}, 1, 2); bc.Reset(2, 1); if(bc.Index != 2) { throw new TestCaseException("unexpected index"); } }
override public void Run() { BufferChunk bc = new BufferChunk(new byte[]{1, 2, 3}, 1, 2); bc.Reset(0, 1); }
override public void Run() { BufferChunk bc = new BufferChunk(new byte[]{1, 2, 3}, 1, 2); try { bc.Reset(2, 2); throw new TestCaseException("index + length > buffer.Length"); } catch(ArgumentOutOfRangeException){} }
override public void Run() { BufferChunk bc = new BufferChunk(new byte[]{1, 2, 3}, 1, 2); try { bc.Reset(0, -1); throw new TestCaseException("length cannot be < 0"); } catch(ArgumentException){} }