-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use JUnit 5 #35 #38
Use JUnit 5 #35 #38
Conversation
-add JUnit 5 support -remove some unnecessary 'throws Exception's from tests
<artifactId>junit</artifactId> | ||
<version>4.12</version> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-engine</artifactId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m somewhat unfamiliar with JUnit 5. But from what I read, should this be junit-jupter
instead of junit-jupiter-engine
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @JonMR ,
junit-jupiter-engine contains junit-jupiter-api that is required to write tests, engine is needed to run junit 5 tests (https://search.maven.org/artifact/org.junit.jupiter/junit-jupiter-engine/5.5.2/jar)
junit-jupiter contains the same things that are mentioned above + junit-jupiter-params that can be used for parameterised tests. Because now in the project there are no parameterised tests I think this is not needed now. (https://search.maven.org/artifact/org.junit.jupiter/junit-jupiter/5.5.2/jar)
MDC.clear(); | ||
} | ||
|
||
@Test | ||
public void setsTheRequestTrackerHeader() { | ||
requestTrackerClientFilter.filter(clientRequest); | ||
|
||
verify(headersMap).add(eq(this.configuration.getHeaderName()), Mockito.any(UUID.class)); | ||
verify(headersMap).add(eq(this.configuration.getHeaderName()), Mockito.any(String.class)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, I hadn’t noticed this before. Nice.
Thanks again! Happy Hacktober. |
fix #35
-add JUnit 5 support
-remove some unnecessary 'throws Exception's from tests