You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2019/05/26 19:17:26 UTC
[GitHub] [maven-surefire] Tibor17 edited a comment on issue #234: (doc) add
static modifier to signatures
Tibor17 edited a comment on issue #234: (doc) add static modifier to signatures
URL: https://github.com/apache/maven-surefire/pull/234#issuecomment-496024381
@pzygielo
You are wrong. The `@Before` must not be static. Every test method must be isolated due to a new object of the test is created every time the test method is called. The data across test instances must not share. That's important detail in unit tests. That's why setUp and tearDown methods are not static. The same works in JUnit4 and the same works in POJO.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services