JUnit test in Kotlin

Warning: I am a huge noob for TDD and Kotlin.

I found good snippets of code on the Internet for writing JUnit tests in Kotlin, but when I copy and paste, IntelliJ does not automatically import kotlin.test.*or org.junit.Test. Typically, in Eclipse, when I copy and paste code snippets like this, the IDE can determine where these libraries are in my basic java installation. Kotlin / IntelliJ drawings would be the same.

In the screenshot below, any idea why I cannot import test libraries? Do I need to explicitly add them to my path? Should I put them in a folder test, not a folder src?

thank enter image description here

+4
source share
1

JUnit , IntelliJ .

, : (lib/*. jar) IntelliJ IDEA, , junit.

+6

Source: https://habr.com/ru/post/1669624/


All Articles