void function ( ) { mockGameHostingController = mock ( IGameHostingController . class ) ; when ( mockControllerFactory . createGameHostingController ( mockNavigator , mockServerCommunicator ) ) . thenReturn ( mockGameHostingController ) ; mainMenuController . startListening ( ) ; verify ( mockNavigator ) . push ( mockGameHostingController ) ; }
ensures the start listening method navigates the application to the start listening screen . concode_field_sep IControllerFactory mockControllerFactory concode_elem_sep ServerCommunicator mockServerCommunicator concode_elem_sep INavigator mockNavigator concode_elem_sep IMainMenuController mainMenuController concode_elem_sep IGameHostingController mockGameHostingController concode_field_sep void testConstructorNavigatorNull concode_elem_sep void testExitCommandExitsApplication concode_elem_sep void testStartListeningStartsListening concode_elem_sep void testControllerFactory concode_elem_sep void setUp concode_elem_sep void testStartListeningDoesntNavigateIfNotSuccessful concode_elem_sep void testConstructorControllerFactoryNull concode_elem_sep void testStartListeningDisplaysMessageIfNotSuccessful concode_elem_sep void testConstructor concode_elem_sep void testNavigator