public void nullTestingArrays() { string nonNullString = "abracadabra"; SuffixArray theSuffixArray = new SuffixArray(nonNullString); bool result = theSuffixArray.FindSubstring(null); Assert.AreEqual(false, result); result = theSuffixArray.FindSubstring(""); Assert.AreEqual(false, result); }
public void successfulStringsArrays() { string testString = "abracadabra"; SuffixArray theSuffixArray = new SuffixArray(testString); bool result = theSuffixArray.FindSubstring("bra"); Assert.AreEqual(true, result); result = theSuffixArray.FindSubstring("ab"); Assert.AreEqual(true, result); result = theSuffixArray.FindSubstring("cada"); Assert.AreEqual(true, result); result = theSuffixArray.FindSubstring("dab"); Assert.AreEqual(true, result); }
public void failedStringsArrays() { string testString = "abracadabra"; SuffixArray theSuffixArray = new SuffixArray(testString); bool result; result = theSuffixArray.FindSubstring("jason"); Assert.AreEqual(false, result); result = theSuffixArray.FindSubstring("masud"); Assert.AreEqual(false, result); result = theSuffixArray.FindSubstring("testing"); Assert.AreEqual(false, result); result = theSuffixArray.FindSubstring("notastring"); Assert.AreEqual(false, result); }