Skip to content

Commit aaf2dc0

Browse files
committed
Undo Testing changes
1 parent f5b798c commit aaf2dc0

1 file changed

Lines changed: 3 additions & 50 deletions

File tree

android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/screen/menu/MenuManagerTests.java

Lines changed: 3 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
import org.mockito.invocation.InvocationOnMock;
5959
import org.mockito.stubbing.Answer;
6060

61+
import java.lang.reflect.Array;
6162
import java.util.Arrays;
6263
import java.util.Collections;
6364
import java.util.List;
@@ -191,7 +192,7 @@ public void testHMINotReady(){
191192
// updating voice commands before HMI is ready
192193
assertTrue(menuManager.waitingOnHMIUpdate);
193194
// these are the 2 commands we have waiting
194-
assertEquals(menuManager.waitingUpdateMenuCells.size(), 5);
195+
assertEquals(menuManager.waitingUpdateMenuCells.size(), 4);
195196
assertEquals(menuManager.currentHMILevel, HMILevel.HMI_NONE);
196197
// The Menu Manager should send new menu once HMI full occurs
197198
sendFakeCoreOnHMIFullNotifications();
@@ -468,50 +469,6 @@ public void testClearingMenu(){
468469
assertEquals(menuManager.menuCells.size(), 0);
469470
}
470471

471-
public void testSettingMenuWithEmptyVoiceCommands(){
472-
// Make sure we can send an empty menu with no issues
473-
// start fresh
474-
menuManager.oldMenuCells = null;
475-
menuManager.menuCells = null;
476-
menuManager.inProgressUpdate = null;
477-
menuManager.waitingUpdateMenuCells = null;
478-
menuManager.waitingOnHMIUpdate = false;
479-
480-
MenuSelectionListener menuSelectionListener = mock(MenuSelectionListener.class);
481-
482-
MenuCell A = new MenuCell("A", null, Collections.EMPTY_LIST, menuSelectionListener);
483-
484-
menuManager.currentHMILevel = HMILevel.HMI_FULL;
485-
List<MenuCell> newMenu = Collections.singletonList(A);
486-
487-
menuManager.setMenuCells(newMenu);
488-
assertEquals(menuManager.menuCells.get(0).getVoiceCommands(), Collections.EMPTY_LIST);
489-
}
490-
491-
public void testSettingMenuWithVoiceCommands(){
492-
// Make sure we can send an empty menu with no issues
493-
// start fresh
494-
menuManager.oldMenuCells = null;
495-
menuManager.menuCells = null;
496-
menuManager.inProgressUpdate = null;
497-
menuManager.waitingUpdateMenuCells = null;
498-
menuManager.waitingOnHMIUpdate = false;
499-
500-
501-
MenuSelectionListener menuSelectionListener = mock(MenuSelectionListener.class);
502-
503-
List<String> voiceCommandList = Collections.singletonList("Hello There");
504-
505-
MenuCell A = new MenuCell("A", null, voiceCommandList, menuSelectionListener);
506-
507-
menuManager.currentHMILevel = HMILevel.HMI_FULL;
508-
List<MenuCell> newMenu = Collections.singletonList(A);
509-
510-
menuManager.setMenuCells(newMenu);
511-
assertEquals(menuManager.menuCells.get(0).getVoiceCommands(), voiceCommandList);
512-
}
513-
514-
515472
public void testOpeningMainMenu(){
516473
// call open Menu
517474
MenuManager mockMenuManager = mock(MenuManager.class);
@@ -568,7 +525,6 @@ private List<MenuCell> createTestCells(){
568525
MenuSelectionListener menuSelectionListener1 = mock(MenuSelectionListener.class);
569526
MenuSelectionListener menuSelectionListener2 = mock(MenuSelectionListener.class);
570527
MenuSelectionListener menuSelectionListener3 = mock(MenuSelectionListener.class);
571-
MenuSelectionListener menuSelectionListener4 = mock(MenuSelectionListener.class);
572528
MenuSelectionListener menuSelectionListenerSub1 = mock(MenuSelectionListener.class);
573529
MenuSelectionListener menuSelectionListenerSub2 = mock(MenuSelectionListener.class);
574530

@@ -578,12 +534,9 @@ private List<MenuCell> createTestCells(){
578534
// some menu cells
579535
List<String> voice2 = Collections.singletonList("Cell two");
580536

581-
List<String> voice3 = Collections.EMPTY_LIST;
582-
583537
mainCell1 = new MenuCell("Test Cell 1", livio, null, menuSelectionListener1);
584538
MenuCell mainCell2 = new MenuCell("Test Cell 2", livio, voice2, menuSelectionListener2);
585539
MenuCell mainCell3 = new MenuCell("Test Cell 3",null, null, menuSelectionListener3);
586-
MenuCell mainCell5 = new MenuCell("Test Cell 5", null, voice3, menuSelectionListener4);
587540

588541
// SUB MENU
589542
MenuCell subCell1 = new MenuCell("SubCell 1",null, null, menuSelectionListenerSub1);
@@ -592,7 +545,7 @@ private List<MenuCell> createTestCells(){
592545
mainCell4 = new MenuCell("Test Cell 4", null, livio, Arrays.asList(subCell1,subCell2)); // sub menu parent cell
593546
mainCell4.setCellId(4);
594547

595-
return Arrays.asList(mainCell1, mainCell2, mainCell3, mainCell4, mainCell5);
548+
return Arrays.asList(mainCell1, mainCell2, mainCell3, mainCell4);
596549
}
597550

598551
private List<MenuCell> createDynamicMenu1(){

0 commit comments

Comments
 (0)