public void TestStringWithDifferentCharacter() { const string s = "ab"; var len = FindLongestSubstring.GetLengthOfLongestSubstring(s); Assert.IsTrue(len == 2, "length is {0}", len); }
public void TestStringWithDuplicatedChar() { const string s = "ababababababab"; var len = FindLongestSubstring.GetLengthOfLongestSubstring(s); Assert.IsTrue(len == 2, "length is {0}", len); }
public void TestStringWithSameCharacter() { const string s = "bbbbbbb"; var len = FindLongestSubstring.GetLengthOfLongestSubstring(s); Assert.IsTrue(len == 1, "length is {0}", len); }