kokoichi206 / rhythm_game

Android rhythm game
0 stars 0 forks source link

Unit test in GameView #46

Closed kokoichi206 closed 2 years ago

kokoichi206 commented 2 years ago

Is your feature request related to a problem? Please describe. Unit test in GameView

kokoichi206 commented 2 years ago

This is the easiest way to implement a test using UI thread ?

    @Test
    @UiThreadTest
    public void returnHomeCheck() {

        gameView.returnHomeCheck();
        assertTrue(gameView.dialog.isShowing());

    }

53f628ce8a1f4c5ad6e3ca13ab2e01ceac40a43d

kokoichi206 commented 2 years ago

A Model of Dialog Test

https://github.com/robolectric/robolectric/blob/master/robolectric/src/test/java/org/robolectric/shadows/ShadowAlertDialogTest.java

kokoichi206 commented 2 years ago

TODO:

kokoichi206 commented 2 years ago

DONE (#49)