Beispiel #1
0
        public void Write(byte[] buffer, int offset, int count, byte[] expected)
        {
            _sut.Write(buffer, offset, count);

            var actual = _writer.ToArray();

            actual.Length.ShouldBe(expected.Length);
            actual.ShouldBe(expected);
        }
Beispiel #2
0
        public byte[] GetContent()
        {
            if (!_isSealed)
            {
                throw new InvalidOperationException("Serialization context is not completed.");
            }

            return(_buffer.ToArray());
        }
Beispiel #3
0
 public void Empty()
 {
     _sut.ToArray().ShouldBeEmpty();
 }