예제 #1
0
        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);

            }
        }
예제 #2
0
 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);
     }
 }