public void EmptyString() { Assert.AreEqual(new Tuple <char?, int>(null, 0), Katas2.LongestRepetition("")); }
public void MultipleLongest() { Assert.AreEqual(new Tuple <char?, int>('a', 2), Katas2.LongestRepetition("aabb")); Assert.AreEqual(new Tuple <char?, int>('b', 1), Katas2.LongestRepetition("ba")); }
public void LongestAtTheEnd() { Assert.AreEqual(new Tuple <char?, int>('a', 4), Katas2.LongestRepetition("bbbaaabaaaa")); }
public void LongestInTheMiddle() { Assert.AreEqual(new Tuple <char?, int>('u', 3), Katas2.LongestRepetition("cbdeuuu900")); }
public void LongestAtTheBeginning() { Assert.AreEqual(new Tuple <char?, int>('a', 4), Katas2.LongestRepetitionLinq("aaaabb")); Assert.AreEqual(new Tuple <char?, int>('b', 5), Katas2.LongestRepetition("abbbbb")); }