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