Beispiel #1
0
 public void Test()
 {
     Assert.Equal(4, TheLongestSubstring.GetLength("arabcacfr"));
 }
Beispiel #2
0
 public void NullInput()
 {
     Assert.Throws <ArgumentNullException>(() => TheLongestSubstring.GetLength(null));
 }
Beispiel #3
0
 public void StringWithNoDuplicateChar()
 {
     Assert.Equal(26, TheLongestSubstring.GetLength("abcdefghijklmnopqrstuvwxyz"));
 }
Beispiel #4
0
 public void StringWithSameChar()
 {
     Assert.Equal(1, TheLongestSubstring.GetLength("ddddddddddddddddddddddd"));
 }
Beispiel #5
0
 public void EmptyString()
 {
     Assert.Equal(0, TheLongestSubstring.GetLength(""));
 }