Fix tests failing due to missing screen during attempted window dismissal
This commit is contained in:
parent
e92bcd81cb
commit
ed3d2d3621
|
@ -1,5 +1,6 @@
|
|||
package net.shadowfacts.cacao.view
|
||||
|
||||
import net.shadowfacts.cacao.CacaoScreen
|
||||
import net.shadowfacts.cacao.Window
|
||||
import net.shadowfacts.cacao.geometry.Point
|
||||
import net.shadowfacts.cacao.geometry.Rect
|
||||
|
@ -14,11 +15,13 @@ import java.util.concurrent.CompletableFuture
|
|||
*/
|
||||
class ViewClickTests {
|
||||
|
||||
lateinit var screen: CacaoScreen
|
||||
lateinit var window: Window
|
||||
|
||||
@BeforeEach
|
||||
fun setup() {
|
||||
window = Window()
|
||||
screen = CacaoScreen()
|
||||
window = screen.addWindow(Window())
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package net.shadowfacts.cacao.view.button
|
||||
|
||||
import net.shadowfacts.cacao.CacaoScreen
|
||||
import net.shadowfacts.cacao.Window
|
||||
import net.shadowfacts.cacao.geometry.Point
|
||||
import net.shadowfacts.cacao.geometry.Size
|
||||
|
@ -17,11 +18,13 @@ import java.util.concurrent.CompletableFuture
|
|||
*/
|
||||
class ButtonClickTests {
|
||||
|
||||
lateinit var screen: CacaoScreen
|
||||
lateinit var window: Window
|
||||
|
||||
@BeforeEach
|
||||
fun setup() {
|
||||
window = Window()
|
||||
screen = CacaoScreen()
|
||||
window = screen.addWindow(Window())
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package net.shadowfacts.cacao.view.button
|
||||
|
||||
import net.shadowfacts.cacao.CacaoScreen
|
||||
import net.shadowfacts.cacao.Window
|
||||
import net.shadowfacts.cacao.geometry.Point
|
||||
import net.shadowfacts.cacao.geometry.Rect
|
||||
|
@ -28,11 +29,13 @@ class EnumButtonTests {
|
|||
ONE, TWO, THREE
|
||||
}
|
||||
|
||||
lateinit var screen: CacaoScreen
|
||||
lateinit var window: Window
|
||||
|
||||
@BeforeEach
|
||||
fun setup() {
|
||||
window = Window()
|
||||
screen = CacaoScreen()
|
||||
window = screen.addWindow(Window())
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue