Browse Source

Refactored MenuManagerTest for better naming convention

feature-menu
Nick Stolbov 3 years ago
parent
commit
298fde4055
  1. 6
      src/test/java/Application/MenuManagerTest.java

6
src/test/java/Application/MenuManagerTest.java

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

Loading…
Cancel
Save