I'm trying to use JUnit5.
First, I added dependencies to maven project:
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.3.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-runner</artifactId>
<version>1.3.0</version>
<scope>test</scope>
</dependency>
</dependencies>
Then, I created a test:
package com.example.multicurrency;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class JunitTests {
@Test
void testAssertTrue() {
assertTrue(false);
}
}
After that, I run the test. The following is what I have got:
org.junit.platform.launcher.core.DefaultLauncher handleThrowable
warning: TestEngine with ID 'junit-vintage' failed to discover tests
java.lang.NoClassDefFoundError: org/junit/platform/engine/support/filter/ExclusionReasonConsumingFilter
Caused by: java.lang.ClassNotFoundException: org.junit.platform.engine.support.filter.ExclusionReasonConsumingFilter
org.opentest4j.AssertionFailedError:
Expected :<true>
Actual :<false>
The result was what I expected. But the warning confused me. What does the warning mean?