示例#1
0
 public void EmptyString()
 {
     Assert.AreEqual(new Tuple <char?, int>(null, 0), Katas2.LongestRepetition(""));
 }
示例#2
0
 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"));
 }
示例#3
0
 public void LongestAtTheEnd()
 {
     Assert.AreEqual(new Tuple <char?, int>('a', 4), Katas2.LongestRepetition("bbbaaabaaaa"));
 }
示例#4
0
 public void LongestInTheMiddle()
 {
     Assert.AreEqual(new Tuple <char?, int>('u', 3), Katas2.LongestRepetition("cbdeuuu900"));
 }
示例#5
0
 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"));
 }