mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-27 22:43:30 +08:00
@ -0,0 +1,13 @@
|
||||
package com.thealgorithms.strings;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.CsvSource;
|
||||
|
||||
public class StringCompressionTest {
|
||||
@ParameterizedTest
|
||||
@CsvSource({"a,a","aabbb,a2b3","abbbc,ab3c","aabccd,a2bc2d"})
|
||||
void stringCompressionTest(String input,String expectedOutput){
|
||||
String output=StringCompression.compress(input);
|
||||
assertEquals(expectedOutput, output);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user