public void CanSeekToBeginningOfByteSequence() { using (var stream = new Byte[] { 1, 0, 1, 0, 2 }.ToMemoryStream()) { var found = stream.SeekStartOf(new byte[] { 1, 0, 2 }); Assert.True(found); Assert.AreEqual(2, stream.Position); } }
public void FalseWhenNotFound() { using (var stream = new Byte[] { 1, 0, 1, 0, 1 }.ToMemoryStream()) { var found = stream.SeekStartOf(new byte[] { 1, 0, 2 }); Assert.False(found); } }