如何在另一个测试类中重用现有的 JUnit 测试?
2022-09-01 03:11:33
如何在另一个测试类中重用 JUnit 测试?
例如:
public TestClass1 {
@Test
public void testSomething(){...}
}
public TestClass2 {
@Test
public void testSomethingAndSomethingElse() {
// Somehow execute testSomething()
// and then test something else
}
}