326925 (5) [Avatar] Offline
[ 682 bytes ]
package ch06.ex1_8_1_LateinitializedProperties

import org.junit.Before
import org.junit.Test
import org.junit.Assert

class MyService {
fun performAction(): String = "foo"

class MyTest {
private var myService: MyService? = null

@Before fun setUp() {
myService = MyService()

@Test fun testAction() {
The compiler says it can't find junit. I have tried adding the jar files(junit and hamcrest core but this has not helped.
It is the same gradle script which I will attach.
Dmitry Jemerov (39) [Avatar] Offline
How exactly are you compiling the project?
326925 (5) [Avatar] Offline
I am compiling using Intellij. The compiler says it does not recognise junit.
326925 (5) [Avatar] Offline
I have resolved this issue. You had to get the junit jar files from mavan.