Fix tests failing due to missing screen during attempted window dismissal

This commit is contained in:
Shadowfacts 2019-06-27 19:29:29 -04:00
parent e92bcd81cb
commit ed3d2d3621
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
3 changed files with 12 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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