I have problem about unit testing using JUnit 5, namely when I run test method with parameterized annotation it fails but everything is correct, I think. it is JUnit 5 code:
@Test
@ParameterizedTest
@MethodSource("data")
public void test(int e){
System.out.println("e = " + e);
}
private static Stream data(){
return Stream.of(
Arguments.of(1),
Arguments.of(2)
);
}
, I have tried custom parameterize resolver but there comes up another error: it does not return passed value from data() function, but returns default value what is defined in resolveParameter() function in CustomParameterResolver class. How to solve this problem ?