有谁知道如何解决这个问题。
@RunWith(SpringJUnit4ClassRunner.class)
@RunWith(Parametrized.class)
@ContextConfiguration("/META-INF/blah-spring-test.xml")
public class BlahTest
..
所以我想进行弹簧性质测试,同时希望将其参数化以避免代码重复...
如评论中所述,您不能使用两个跑步者。您应该Parameterized
像使用Spring的TestContextManager一样使用运行程序来加载Spring上下文。
@Before
public void before() throws Exception {
new TestContextManager(getClass()).prepareTestInstance(this);
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句