Files
Java/src/test/java/com/thealgorithms/strings/LongestNonRepeativeSubstringTest.java
StarDxxx a81fb32e6c style: enable TypeName (#5214)
* style: enable `TypeName` in checkstyle

* style: enable `TypeName` in checkstyle

* Update directory

* style: use proper formatting

---------

Co-authored-by: StarDxxx <StarDxxx@users.noreply.github.com>
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>
2024-06-08 13:37:20 +02:00

16 lines
501 B
Java

package com.thealgorithms.strings;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
public class LongestNonRepeativeSubstringTest {
@Test
public void palindrome() {
String input1 = "HelloWorld";
String input2 = "javaIsAProgrammingLanguage";
Assertions.assertEquals(LongestNonRepeativeSubstring.lengthOfLongestSubstring(input1), 5);
Assertions.assertEquals(LongestNonRepeativeSubstring.lengthOfLongestSubstring(input2), 9);
}
}