예제 #1
0
 public void CanSeekTo_EndOf_ByteSequence()
 {
     using (var stream = new Byte[] { 1, 0, 1, 0, 2 }.ToMemoryStream())
     {
         var found = stream.SeekEndOf(new byte[] { 1, 0, 1 });
         Assert.True(found);
         Assert.AreEqual(3, stream.Position);
     }
 }
예제 #2
0
 public void CanSeek_ToEndOf_ByteSequence_WhereSequenceIs_AtEndOfStream()
 {
     using (var stream = new Byte[] { 1, 0, 1, 0, 2 }.ToMemoryStream())
     {
         var found = stream.SeekEndOf(new byte[] { 1, 0, 2 });
         Assert.True(found);
         Assert.AreEqual(5, stream.Position);
     }
 }