今天再用JUnit调试的时候出现了这个问题
java.lang.Exception: No tests found matching [{ExactMatcher:fDisplayName=sayTest],
在调试的时候一直写的是 public void addTest(){}; 就会出现问题,如果方法名不是testXXX,需要加上 @Test注解。
(1)
@Test
public void addTest(){
}
(2)
public void testAdd() {}