Renamed method names to replace "non-repeating" with "Unique".
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
package com.baeldung.algorithms.string;
|
||||
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class LongestSubstringNonRepeatingCharactersTest {
|
||||
|
||||
@Test
|
||||
void givenString_whenGetNonRepeatingCharactersBruteForceCalled_thenResultFoundAsExpected() {
|
||||
String input = "CODINGISAWESOME";
|
||||
Assertions.assertEquals("NGISAWE", LongestSubstringNonRepeatingCharacters.getNonRepeatingCharactersBruteForce(input));
|
||||
}
|
||||
|
||||
@Test
|
||||
void givenString_whenGetNonRepeatingCharactersCalled_thenResultFoundAsExpected() {
|
||||
String input = "CODINGISAWESOME";
|
||||
Assertions.assertEquals("NGISAWE",LongestSubstringNonRepeatingCharacters.getNonRepeatingCharacters(input));
|
||||
}
|
||||
|
||||
}
|
||||
package com.baeldung.algorithms.string;
|
||||
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class LongestSubstringNonRepeatingCharactersTest {
|
||||
|
||||
@Test
|
||||
void givenString_whenGetUniqueCharacterSubstringBruteForceCalled_thenResultFoundAsExpected() {
|
||||
String input = "CODINGISAWESOME";
|
||||
Assertions.assertEquals("NGISAWE", LongestSubstringNonRepeatingCharacters.getUniqueCharacterSubstringBruteForce(input));
|
||||
}
|
||||
|
||||
@Test
|
||||
void givenString_whenGetUniqueCharacterSubstringCalled_thenResultFoundAsExpected() {
|
||||
String input = "CODINGISAWESOME";
|
||||
Assertions.assertEquals("NGISAWE",LongestSubstringNonRepeatingCharacters.getUniqueCharacterSubstring(input));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user