junit: no tests found

后端 未结 11 851
情书的邮戳
情书的邮戳 2020-12-14 05:47

I have inherited a Java project and am new to Java development. I feel a good way for me to get comfortable with the code is to write some tests around it. I\'m writing my c

11条回答
  •  囚心锁ツ
    2020-12-14 05:55

    I had it when using data provider and one of the parameters had a new line character, like this:

    @DataProvider
    public static Object[][] invalidAdjustment() {
        return new Object[][]{
                {"some \n text", false},
                };
    }
    

    Removing the \n solved the issue

提交回复
热议问题