#247 -- Add test class
This commit is contained in:
parent
a9c617075f
commit
6a04b5e037
@ -112,4 +112,5 @@ dependencies {
|
|||||||
implementation group: 'xalan', name: 'xalan', version: '2.7.2'
|
implementation group: 'xalan', name: 'xalan', version: '2.7.2'
|
||||||
|
|
||||||
testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-test'
|
testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-test'
|
||||||
|
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.10.2'
|
||||||
}
|
}
|
||||||
|
19
src/test/java/ru/ulstu/StreamApiUtilsTest.java
Normal file
19
src/test/java/ru/ulstu/StreamApiUtilsTest.java
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user