@ -18,5 +18,8 @@ public class MenuManager {
return this.currentMenu;
}
public boolean inRootMenu(){
return this.currentMenu.equals(this.rootMenu);
@ -35,4 +35,11 @@ class MenuManagerTest {
mm.select(0);
assertEquals(mm.getCurrentMenu(), rootMenu.getMenu(0).getMenu(0));
@Test
void testIsRootMenuFunction(){
assertTrue(mm.inRootMenu());
assertFalse(mm.inRootMenu());