mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/controller/TestActiveControllerImpl.java
@Test
    public void testGetActiveControllerNotSet()
    {        
        //mock controller model
        ControllerModel model = new ControllerModel(123456, m_ControllerImageInterface);
        ControllerModel model2 = new ControllerModel(654321, m_ControllerImageInterface);
        
        model2.setIsReady(true);
        
        List<ControllerModel> models = new ArrayList<ControllerModel>();
        models.add(model);
        models.add(model2);
        
        when(m_ControllerMgr.getAllControllers()).thenReturn(models);
        
        //verify
        assertThat((m_SUT.getActiveController()).getId(), is(654321));
    }
/**
     * Verify default setting of ready active controller if one is not set.
     */
Verify default setting of ready active controller if one is not set.
Verify default setting of ready active controller if one is not set .
@Test
    public void testGetActiveControllerNotSet()
    {        
        ControllerModel model = new ControllerModel(123456, m_ControllerImageInterface);
        ControllerModel model2 = new ControllerModel(654321, m_ControllerImageInterface);
        model2.setIsReady(true);
        List<ControllerModel> models = new ArrayList<ControllerModel>();
        models.add(model);
        models.add(model2);
        when(m_ControllerMgr.getAllControllers()).thenReturn(models);
        assertThat((m_SUT.getActiveController()).getId(), is(654321));
    }
@ Test public void testGetActiveControllerNotSet ( ) { ControllerModel model = new ControllerModel ( 123456 , m_ControllerImageInterface ) ; ControllerModel model2 = new ControllerModel ( 654321 , m_ControllerImageInterface ) ; model2 . setIsReady ( true ) ; List < ControllerModel > models = new ArrayList < ControllerModel > ( ) ; models . add ( model ) ; models . add ( model2 ) ; when ( m_ControllerMgr . getAllControllers ( ) ) . thenReturn ( models ) ; assertThat ( ( m_SUT . getActiveController ( ) ) . getId ( ) , is ( 654321 ) ) ; }
Verify default setting of ready active controller if one is not set.
Verify default setting of ready active controller if one is not set .
//mock controller model //verify