https://kotlinlang.org logo
a

amanda.hinchman-dominguez

01/20/2019, 12:00 AM
Copy code
class TestView : View() {
    override val root = VBox()
}

class ControlsTest {
    @Before
    fun setupFX() {
        FxToolkit.registerPrimaryStage()
    }

   @Test
    fun testImageview() {
        val view = TestView()
        val property = SimpleStringProperty(null)
        val imageView = view.imageview(property)

        Assert.assertNull(imageView.image)

        property.value = "/tornadofx/tests/person.png"

        Assert.assertNotNull(imageView.image)
    }
}