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); }
public byte[] GetContent() { if (!_isSealed) { throw new InvalidOperationException("Serialization context is not completed."); } return(_buffer.ToArray()); }
public void Empty() { _sut.ToArray().ShouldBeEmpty(); }