Joe*_*Joe 4 java eclipse junit
我按照描述的方法使用每个方法使用一个内部类来组织我的junit测试:
在这里,在一个haacked文章(关于nunit测试),和
这里,在这个SO问题
public class TestMyThing {
public static class TestMyThingMethodOne {
@Test
public void testMethodOneDoesACertainBehaviour() {
// terse, clear testing code goes here
}
@Test
public void testMethodOneHasSomeOtherDesiredBehaviour() {
// more inspiring testing code here
}
}
public static class TestMyThingMethodTwo {
... etc
}
}
Run Code Online (Sandbox Code Playgroud)
但是,当我尝试为此运行junit测试时,Eclipse会询问我要运行哪个内部类测试,而我只能选择一个.有没有一种方法可以指定我希望每个内部类中的每个测试都能运行TestMyThing类?