Как написать модульные тесты JUNIT6 в Java? Еще слишком рано спрашивать?public class MathUtil{
public static boolean isEven(int candiate){
return candidate % 2 == 0;
}
}
< /code>
old junit5 test < /p>
class MathUtilTest{
@Test
void testMathUtilEven(){
//given
int candiate = 2;
//when
boolean result = MathUtil.isEven(candiate);
//then
Assertion.AssertTrue(result);
}
}
< /code>
Мой файл pom.xml выглядит так: < /p>
...
org.junit.jupiter
junit-jupiter-api
6.0.0-M2
test
...
Подробнее здесь: https://stackoverflow.com/questions/797 ... est-how-to