public void TestEmptyText() { Assert.AreEqual(-1, StringHelpers.IndexOf("", "bb", 0, 0)); Assert.AreEqual(0, StringHelpers.IndexOf("", "", 0, 0)); Assert.AreEqual(0, "".IndexOf("", 0, 0)); }
public void TestValuePartiallyExists() { Assert.AreEqual(-1, StringHelpers.IndexOf("aabbcc", "ccaa", 0, 6)); }
public void TestEmptyValue() { Assert.AreEqual(2, StringHelpers.IndexOf("aabbcc", "", 2, 4)); }
public void TestEnding() { Assert.AreEqual(4, StringHelpers.IndexOf("aabbcc", "cc", 0, 6)); }
public void TestInvalidValueLength() { Assert.AreEqual(-1, StringHelpers.IndexOf("aabbcc", "xxxxxxx", 0, 6)); }
public void TestEmptyText() { Assert.AreEqual(false, StringHelpers.Compare("", "bb", 0)); Assert.AreEqual(true, StringHelpers.Compare("", "", 0)); }
public void TestBeginning() { Assert.AreEqual(0, StringHelpers.IndexOf("aabbcc", "aa", 0, 6)); }
public void TestNullText() { Assert.Throws <ArgumentNullException>( () => StringHelpers.IndexOf(null, "bb", 2, 3)); }
public void TestOutOfCountRange() { Assert.AreEqual(-1, StringHelpers.IndexOf("aab", "ab", 0, 2)); }
public void TestSimple() { Assert.AreEqual(true, StringHelpers.Compare("aabbcc", "bb", 2)); Assert.AreEqual(false, StringHelpers.Compare("aabbcc", "bb", 3)); }
public void TestNullValue() { Assert.Throws <ArgumentNullException>( () => StringHelpers.IndexOf("aabbcc", null, 2, 3)); }
public void TestNullText() { Assert.Throws <ArgumentNullException>( () => StringHelpers.Compare(null, "bb", 2)); }
public void TestNullValue() { Assert.Throws <ArgumentNullException>( () => StringHelpers.Compare("aabbcc", null, 2)); }
public void TestInvalidStartIndex() { Assert.Throws <ArgumentOutOfRangeException>( () => StringHelpers.Compare("aabbcc", "bbc", 4)); }
public void TestSimple() { Assert.AreEqual(2, StringHelpers.IndexOf("aabbcc", "bb", 0, 6)); }
public void TestNegative() { Assert.AreEqual(-1, StringHelpers.IndexOf("aabbcc", "xx", 0, 6)); }
public void TestInvalidCount() { Assert.Throws <ArgumentOutOfRangeException>( () => StringHelpers.IndexOf("aabbcc", "bb", 2, 5)); }
public void TestEmptyValue() { Assert.AreEqual(true, StringHelpers.Compare("aabbcc", "", 2)); }