It is because of test isolation.
No test should depend on another.
More Related Contents:
- How to run test methods in specific order in JUnit4?
- How to test that no exception is thrown?
- How to run all tests belonging to a certain Category in JUnit 4
- differences between 2 JUnit Assert classes
- setUp/tearDown (@Before/@After) why we need them in JUnit?
- How do I test a class that has private methods, fields or inner classes?
- How do you assert that a certain exception is thrown in JUnit 4 tests?
- Java: How to test methods that call System.exit()?
- Run single test from a JUnit class using command-line
- Assert equals between 2 Lists in Junit
- How to test void method with Junit testing tools?
- Multiple RunWith Statements in jUnit
- How to use ArgumentCaptor for stubbing?
- annotation to make a private method public only for test classes [duplicate]
- Grouping JUnit tests
- How to mock new Date() in java using Mockito
- How do I assert equality on two classes without an equals method?
- How do I assert an Iterable contains elements with a certain property?
- How to use JUnit to test asynchronous processes
- AssertEquals 2 Lists ignore order
- Using different classloaders for different JUnit tests?
- How to define a JUnit method rule in a test suite?
- java.lang.NoClassDefFoundError in junit
- how to export (JUnit) test suite as executable jar
- Class Not Found: Empty Test Suite in IntelliJ
- Cleanup after all junit tests
- Testing against Java EE 6 API
- How do I unit test jdbc code in java? [closed]
- How to mock a static final variable using JUnit, EasyMock or PowerMock
- JUnit test with dynamic number of tests