File tree Expand file tree Collapse file tree
android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/screen/menu Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -425,6 +425,27 @@ public void testAlgorithmTest5(){
425425 assertEquals (menuManager .keepsOld .size (), 3 );
426426 }
427427
428+ public void testSettingNullMenu (){
429+
430+ // Make sure we can send an empty menu with no issues
431+ // start fresh
432+ menuManager .oldMenuCells = null ;
433+ menuManager .menuCells = null ;
434+ menuManager .inProgressUpdate = null ;
435+ menuManager .waitingUpdateMenuCells = null ;
436+ menuManager .waitingOnHMIUpdate = false ;
437+
438+ menuManager .currentHMILevel = HMILevel .HMI_FULL ;
439+ // send new cells. They should set the old way
440+ List <MenuCell > oldMenu = createDynamicMenu1 ();
441+ List <MenuCell > newMenu = null ;
442+ menuManager .setMenuCells (oldMenu );
443+ assertEquals (menuManager .menuCells .size (), 4 );
444+
445+ menuManager .setMenuCells (newMenu );
446+ assertEquals (menuManager .menuCells .size (), 0 );
447+ }
448+
428449 public void testClearingMenu (){
429450
430451 // Make sure we can send an empty menu with no issues
You can’t perform that action at this time.
0 commit comments