Skip to content

injectMocks method is missing #82

@hyungonkim-StroeerNZ

Description

@hyungonkim-StroeerNZ

class MyTest : TestsWithMocks() {
override fun setUpMocks() = mocker.injectMocks(this)

@Mock lateinit var view: View
@Fake lateinit var model: Model

val controller by withMocks { Controller(view = view, firstModel = model) }

@Test fun controllerTest() {
    every { view.render(isAny()) } returns true
    controller.start()
    verify { view.render(model) }
}

}

injectMocks method is not found in the Mock class. Where is it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions