-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Adds description for JUnit 5 usage #911
Conversation
docs/usage.md
Outdated
|
||
### JUnit 5 | ||
|
||
**JUnit5**: you need to manually start container in *@BeforeAll* annotated method in test (tear down happens automatically on test end) |
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.
this example does not reflect the previous one, with JUnit 4. Maybe we should replace it with @BeforeEach
/@AfterEach
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.
Or alternatively, use @ClassRule
in the JUnit4 example.
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.
Also please uppercase You
and .
at the end of the sentence.
You need to manually start the container in a *@BeforeAll* annotated method in your test
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.
Also the tear down happen on JVM exit.
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.
Agree, will adjust it
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.
Thanks for this PR, I've added some small remarks.
docs/usage.md
Outdated
|
||
### Junit 4 | ||
|
||
**JUnit4 @Rule/@ClassRule**: this mode starts container before your tests and tears it down afterwards. |
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.
this
with uppercase
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.
That part was copied from database_container.md
- should I also adjust it there too ?
docs/usage.md
Outdated
|
||
**JUnit5**: you need to manually start container in *@BeforeAll* annotated method in test (tear down happens automatically on test end) | ||
|
||
Start container in @BeforeAll method: |
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.
Start container in a method annotated with @BeforeAll:
docs/usage.md
Outdated
|
||
### JUnit 5 | ||
|
||
**JUnit5**: you need to manually start container in *@BeforeAll* annotated method in test (tear down happens automatically on test end) |
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.
Or alternatively, use @ClassRule
in the JUnit4 example.
docs/usage.md
Outdated
|
||
### JUnit 5 | ||
|
||
**JUnit5**: you need to manually start container in *@BeforeAll* annotated method in test (tear down happens automatically on test end) |
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.
Also please uppercase You
and .
at the end of the sentence.
You need to manually start the container in a *@BeforeAll* annotated method in your test
docs/usage.md
Outdated
|
||
### JUnit 5 | ||
|
||
**JUnit5**: you need to manually start container in *@BeforeAll* annotated method in test (tear down happens automatically on test end) |
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.
Also the tear down happen on JVM exit.
@artjomka Thanks for your contribution. |
Adds separate section in usage documentation to address differences in JUnit4/JUnit5 approaches.