mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-12-19 07:00:35 +08:00
refactor: unified duplicate Anagram classes into a single implementation (#6290)
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package com.thealgorithms.strings;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.CsvSource;
|
||||
|
||||
class CharactersSameTest {
|
||||
|
||||
@ParameterizedTest
|
||||
@CsvSource({"aaa, true", "abc, false", "'1 1 1 1', false", "111, true", "'', true", "' ', true", "'. ', false", "'a', true", "' ', true", "'ab', false", "'11111', true", "'ababab', false", "' ', true", "'+++', true"})
|
||||
void testIsAllCharactersSame(String input, boolean expected) {
|
||||
assertEquals(CharactersSame.isAllCharactersSame(input), expected);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user