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