#247 -- Add test class

dev
Anton Romanov 2 months ago
parent a9c617075f
commit 6a04b5e037

@ -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'
}

@ -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…
Cancel
Save