junit: no tests found

后端 未结 11 899
情书的邮戳
情书的邮戳 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条回答
  •  猫巷女王i
    2020-12-14 06:13

    I bumped into the situation in JUnit 5 when created a private method:

    import org.junit.jupiter.api.Test
    
    class Test1 {
    
        @Test
        private fun sort() {
            println("1")
        }
    }
    

    Remove private.

提交回复
热议问题