|
|
@ -27,7 +27,7 @@ class MenuManagerTest { |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void testSelectFunction() { |
|
|
|
void select() { |
|
|
|
assertNull(mm.getCurrentMenu()); |
|
|
|
mm.select(0); |
|
|
|
assertEquals(mm.getCurrentMenu().getName(), "Menu1"); |
|
|
@ -36,14 +36,14 @@ class MenuManagerTest { |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void testIsRootMenuFunction() { |
|
|
|
void inRootMenu() { |
|
|
|
assertTrue(mm.inRootMenu()); |
|
|
|
mm.select(0); |
|
|
|
assertFalse(mm.inRootMenu()); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void testBackFunction() { |
|
|
|
void back() { |
|
|
|
try { |
|
|
|
mm.back(); |
|
|
|
Assertions.fail("Test failed: shouldn't be able to go back in rootMenu"); |
|
|
|