public void Common_Test() { // Arrange var solution = new LongestSubstringWithoutRepeatingCharactersSolution(); var expected = 6; //act var result = solution.LengthOfLongestSubstring("abcdefdc"); //Assert Assert.Equal(expected, result); }
public void Last_Part_Is_Longest_Substring() { // Arrange var solution = new LongestSubstringWithoutRepeatingCharactersSolution(); var expected = 8; //act var result = solution.LengthOfLongestSubstring("abcabcdefrabcdefrt"); //Assert Assert.Equal(expected, result); }
public void Duplications_In_Beginning() { // Arrange var solution = new LongestSubstringWithoutRepeatingCharactersSolution(); var expected = 2; //act var result = solution.LengthOfLongestSubstring("aab"); //Assert Assert.Equal(expected, result); }
public void Test_With_Duplicate_Chars() { // Arrange var solution = new LongestSubstringWithoutRepeatingCharactersSolution(); var expected = 3; //act var result = solution.LengthOfLongestSubstring("pwwkew"); //Assert Assert.Equal(expected, result); }
public void Second_Part_Is_Right_Sub_String() { // Arrange var solution = new LongestSubstringWithoutRepeatingCharactersSolution(); var expected = 5; //act var result = solution.LengthOfLongestSubstring("abcdabcde"); //Assert Assert.Equal(expected, result); }
public void Zero_Length() { // Arrange var solution = new LongestSubstringWithoutRepeatingCharactersSolution(); var expected = 0; //act var result = solution.LengthOfLongestSubstring(""); //Assert Assert.Equal(expected, result); }
public void Test1() { var lengthOfLongestSubstring = new LongestSubstringWithoutRepeatingCharactersSolution().LengthOfLongestSubstring("abba"); }