예제 #1
0
 public void SubstringEqualsOverSizeCountWithIndexThrows()
 {
     using (var buffer = new StringBuffer("A"))
     {
         Assert.Throws<ArgumentOutOfRangeException>(() => buffer.SubstringEquals("", startIndex: 1, count: 1));
     }
 }
예제 #2
0
 public void SubstringEquals(string source, string value, int startIndex, int count, bool expected)
 {
     using (var buffer = new StringBuffer(source))
     {
         Assert.Equal(expected, buffer.SubstringEquals(value, startIndex: (ulong)startIndex, count: count));
     }
 }
예제 #3
0
 public void SubstringEqualsNegativeCountThrows()
 {
     using (var buffer = new StringBuffer())
     {
         Assert.Throws<ArgumentOutOfRangeException>(() => buffer.SubstringEquals("", startIndex: 0, count: -2));
     }
 }