Skip to content

Commit

Permalink
replace dynatest with junit5
Browse files Browse the repository at this point in the history
  • Loading branch information
mvysny committed Oct 28, 2024
1 parent e815b51 commit 29ede33
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
16 changes: 9 additions & 7 deletions karibu-testing-v10/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,17 +213,19 @@ simple testing app uses `MainView` as the root route):

Kotlin:
```kotlin
class MyUITest : DynaTest({
lateinit var routes: Routes
beforeGroup { routes = Routes().autoDiscoverViews("com.vaadin.flow.demo") }
beforeEach { MockVaadin.setup(routes) }
afterEach { MockVaadin.tearDown() }
class MyUITest {
companion object {
lateinit var routes: Routes
@BeforeAll @JvmStatic fun scanForRoutes() { routes = Routes().autoDiscoverViews("com.vaadin.flow.demo") }
}
@BeforeEach fun fakeVaadin() { MockVaadin.setup(routes) }
@AfterEach fun tearDownVaadin() { MockVaadin.tearDown() }

test("simple UI test") {
@Test fun `simple UI test`() {
val main = UI.getCurrent().children.findFirst().get() as MainView
expect(2) { main.children.count() }
}
})
}
```

Java:
Expand Down
1 change: 0 additions & 1 deletion karibu-testing-v24/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ dependencies {
testImplementation(libs.vaadin.v24.all)
api(project(":karibu-testing-v23"))

testImplementation(libs.dynatest)
testImplementation(libs.slf4j.simple)
}

Expand Down

0 comments on commit 29ede33

Please sign in to comment.