Exemplo n.º 1
0
 public void SubstringEqualsOverSizeCountWithIndexThrows()
 {
     using (var buffer = new StringBuffer("A"))
     {
         Assert.Throws<ArgumentOutOfRangeException>(() => buffer.SubstringEquals("", startIndex: 1, count: 1));
     }
 }
Exemplo n.º 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));
     }
 }
Exemplo n.º 3
0
 public void SubstringEqualsNegativeCountThrows()
 {
     using (var buffer = new StringBuffer())
     {
         Assert.Throws<ArgumentOutOfRangeException>(() => buffer.SubstringEquals("", startIndex: 0, count: -2));
     }
 }