希望这是一个简单的问题。
我有一个 Spring Boot 测试。
注释是:
@RunWith(SpringRunner.class)
@SpringBootTest(classes = Main.class)
@TestPropertySource(locations { "myproperties.properties" })
我有一个我很想使用@RunWith(Theories.class) 的测试。该测试在我的代码中的几个不同位置测试基本相同的东西。
当然,@RunWith 必须是单数。
那么有没有办法让这些理论开始成为一项规则呢?还是 SpringRunner.class?或者是什么让它们可以共存?