Как можно сменить версию Junit
Весь вопрос заключается в том, как изменить версию Junit? Когда начал писать тесты, то IDEA спрашивала какой хочу использовать. Отметил на тот момент JUnit4, но хочу 5 версию попробовать. Верно понимаю, что мне для этого нужно просто аннотации поменять, которые используются в 5 версии и всё? Больше никаких действий не требуется. В Pom.xml у меня такие зависимости:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
</dependency>
Ответы (1 шт):
Автор решения: AlekseiGaile
→ Ссылка
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.3.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.3.2</version>
<scope>test</scope>
</dependency>
Добавьте зависимости в pom