mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/controller/TestControllerMgrImpl.java
@Test
    public void testEventHelperGetControllerCaps()
    {
        //controller ID
        int contNew = 6431;        
        RemoteChannel channel = addChannelMockHelper(contNew);//mock channel lookup
        
        //mock addition of controller
        m_ChannelHelper.handleEvent(createBasicChannelUpdatedEvent(channel, contNew));  
        //mock sys info response for new controller
        mockControllerMessage(contNew, BaseMessageType.ControllerInfo);
        
        mockControllerMessage(contNew, BaseMessageType.GetControllerCapabilitiesResponse);
       
        //get controller
        ControllerModel controller = m_SUT.getController(contNew);

        assertThat(controller.getCapabilities().getDescription(), is("test description"));
        assertThat(controller.getCapabilities().isBatteryAmpHourReported(), is(false));
        assertThat(controller.getCapabilities().getCpuSpeed(), is(1.20F));
        assertThat(controller.getCapabilities().isLowPowerModeSupported(), is(true));
        assertThat(controller.getCapabilities().getMaxVoltage(), is(new VoltageVolts().withValue(.10F)));
        assertThat(controller.getCapabilities().getMinVoltage(), is(new VoltageVolts().withValue(.01F)));
        assertThat(controller.getCapabilities().getNominalVoltage(), is(new VoltageVolts().withValue(.08F)));
        assertThat(controller.getCapabilities().getOperatingSystemsSupported(), is(OperatingSystemTypeEnum.WIN_7));
        assertThat(controller.getCapabilities().isBatteryAmpHourReported(), is(false));
        assertThat(controller.getCapabilities().isSetPhysicalLink(), is(false));
        assertThat(controller.getCapabilities().getSystemMemory(), is(4));
        assertThat(controller.getCapabilities().isVoltageReported(), is(false));           
    }
/**
     * Test proper handling of GetControllerCapabiltiesResponse message.
     * Verify controller capabilities are set. 
     */
Test proper handling of GetControllerCapabiltiesResponse message.
Verify controller capabilities are set.
Test proper handling of GetControllerCapabiltiesResponse message . Verify controller capabilities are set .
@Test
    public void testEventHelperGetControllerCaps()
    {
        int contNew = 6431;        
        RemoteChannel channel = addChannelMockHelper(contNew);
        m_ChannelHelper.handleEvent(createBasicChannelUpdatedEvent(channel, contNew));  
        mockControllerMessage(contNew, BaseMessageType.ControllerInfo);
        mockControllerMessage(contNew, BaseMessageType.GetControllerCapabilitiesResponse);
        ControllerModel controller = m_SUT.getController(contNew);
        assertThat(controller.getCapabilities().getDescription(), is("test description"));
        assertThat(controller.getCapabilities().isBatteryAmpHourReported(), is(false));
        assertThat(controller.getCapabilities().getCpuSpeed(), is(1.20F));
        assertThat(controller.getCapabilities().isLowPowerModeSupported(), is(true));
        assertThat(controller.getCapabilities().getMaxVoltage(), is(new VoltageVolts().withValue(.10F)));
        assertThat(controller.getCapabilities().getMinVoltage(), is(new VoltageVolts().withValue(.01F)));
        assertThat(controller.getCapabilities().getNominalVoltage(), is(new VoltageVolts().withValue(.08F)));
        assertThat(controller.getCapabilities().getOperatingSystemsSupported(), is(OperatingSystemTypeEnum.WIN_7));
        assertThat(controller.getCapabilities().isBatteryAmpHourReported(), is(false));
        assertThat(controller.getCapabilities().isSetPhysicalLink(), is(false));
        assertThat(controller.getCapabilities().getSystemMemory(), is(4));
        assertThat(controller.getCapabilities().isVoltageReported(), is(false));           
    }
@ Test public void testEventHelperGetControllerCaps ( ) { int contNew = 6431 ; RemoteChannel channel = addChannelMockHelper ( contNew ) ; m_ChannelHelper . handleEvent ( createBasicChannelUpdatedEvent ( channel , contNew ) ) ; mockControllerMessage ( contNew , BaseMessageType . ControllerInfo ) ; mockControllerMessage ( contNew , BaseMessageType . GetControllerCapabilitiesResponse ) ; ControllerModel controller = m_SUT . getController ( contNew ) ; assertThat ( controller . getCapabilities ( ) . getDescription ( ) , is ( "test description" ) ) ; assertThat ( controller . getCapabilities ( ) . isBatteryAmpHourReported ( ) , is ( false ) ) ; assertThat ( controller . getCapabilities ( ) . getCpuSpeed ( ) , is ( 1.20F ) ) ; assertThat ( controller . getCapabilities ( ) . isLowPowerModeSupported ( ) , is ( true ) ) ; assertThat ( controller . getCapabilities ( ) . getMaxVoltage ( ) , is ( new VoltageVolts ( ) . withValue ( .10F ) ) ) ; assertThat ( controller . getCapabilities ( ) . getMinVoltage ( ) , is ( new VoltageVolts ( ) . withValue ( .01F ) ) ) ; assertThat ( controller . getCapabilities ( ) . getNominalVoltage ( ) , is ( new VoltageVolts ( ) . withValue ( .08F ) ) ) ; assertThat ( controller . getCapabilities ( ) . getOperatingSystemsSupported ( ) , is ( OperatingSystemTypeEnum . WIN_7 ) ) ; assertThat ( controller . getCapabilities ( ) . isBatteryAmpHourReported ( ) , is ( false ) ) ; assertThat ( controller . getCapabilities ( ) . isSetPhysicalLink ( ) , is ( false ) ) ; assertThat ( controller . getCapabilities ( ) . getSystemMemory ( ) , is ( 4 ) ) ; assertThat ( controller . getCapabilities ( ) . isVoltageReported ( ) , is ( false ) ) ; }
Test proper handling of GetControllerCapabiltiesResponse message.
Test proper handling of GetControllerCapabiltiesResponse message .
//controller ID //mock channel lookup //mock addition of controller //mock sys info response for new controller //get controller