#247 -- Add test class

This commit is contained in:
Anton Romanov 2024-05-02 13:27:11 +04:00
parent a9c617075f
commit 6a04b5e037
2 changed files with 20 additions and 0 deletions

View File

@ -112,4 +112,5 @@ dependencies {
implementation group: 'xalan', name: 'xalan', version: '2.7.2'
testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-test'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.10.2'
}

View File

@ -0,0 +1,19 @@
package ru.ulstu;
import org.junit.jupiter.api.Test;
import ru.ulstu.core.util.StreamApiUtils;
import java.util.List;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class StreamApiUtilsTest {
@Test
public void testMappingByDay() {
List<Integer> integersInitial = List.of(1, 2);
List<Integer> integers = StreamApiUtils.convert(List.of("1", "2"), Integer::valueOf);
assertEquals(integersInitial, integers);
}
}