JUnit with Kotlin - 这个类没有构造函数

Neo*_*Neo 2 java testing junit kotlin

我正在尝试在我的Kotlin应用程序中使用JUnit4实现测试(kotlin.test在我的Kotlin运行时库中似乎不存在,我现在不知道如何获得它).
但是,我只是通过使用Test注释遇到错误.
那是我的代码:

import junit.framework.*

class IntTest {
    @Test    <------------- This line
    fun test1() {

    }
}
Run Code Online (Sandbox Code Playgroud)

在指定的行上,Eclipse给出了一条错误消息:"This class does not have a constructor".
我不明白是什么问题.哪个类没有构造函数,为什么它有一个?

Pav*_*ngh 6

junit.framework.Test是一个接口,它的实现已经过时,因为API 24.因为它是一个接口,因此它导致错误

"This class does not have a constructor".
Run Code Online (Sandbox Code Playgroud)

在注释处理期间,实际上正在寻找一个类.

解决方案:删除并使用 import org.junit.Test;