mil.dod.th.ose.integration/src/mil/dod/th/ose/controller/integration/controller/TestGenericTerraHarvestController.java
@Test
    public void testGetCapabilities() throws UnmarshalException, IOException
    {
        TerraHarvestController terraHarvestController = IntegrationTestRunner.getService(TerraHarvestController.class);

        assertThat(terraHarvestController,is(notNullValue()));

        ControllerCapabilities caps = terraHarvestController.getCapabilities();
        
        assertThat(caps, is(notNullValue()));
        assertThat(caps.getManufacturer(), is("Unknown"));
        assertThat(caps.getDescription(), is("Example Controller"));
        assertThat(caps.getProductName(), is("Example Controller"));
        
        // make sure that values are not even set
        assertThat(caps.isSetIdOverridden(), is(false));
        assertThat(caps.isSetNameOverridden(), is(false));
        assertThat(caps.isSetVersionOverridden(), is(false));
        assertThat(caps.isSetBuildInfoOverridden(), is(false));

        assertThat(caps.isSetBatteryAmpHourReported(), is(false));
        assertThat(caps.isSetLowPowerModeSupported(), is(false));
        assertThat(caps.isSetVoltageReported(), is(false));
        
        BufferedImage img= ImageIO.read(new ByteArrayInputStream(caps.getPrimaryImage().getValue()));
        int imHeight = img.getHeight();
        int imWidth = img.getWidth();
        assertThat(imHeight, is(128));
        assertThat(imWidth, is(128));        
    }
/**
     * Test for that the XML unmarshal service correctly reads and translates a capabilities XML file.
     */
Test for that the XML unmarshal service correctly reads and translates a capabilities XML file.
Test for that the XML unmarshal service correctly reads and translates a capabilities XML file .
@Test
    public void testGetCapabilities() throws UnmarshalException, IOException
    {
        TerraHarvestController terraHarvestController = IntegrationTestRunner.getService(TerraHarvestController.class);
        assertThat(terraHarvestController,is(notNullValue()));
        ControllerCapabilities caps = terraHarvestController.getCapabilities();
        assertThat(caps, is(notNullValue()));
        assertThat(caps.getManufacturer(), is("Unknown"));
        assertThat(caps.getDescription(), is("Example Controller"));
        assertThat(caps.getProductName(), is("Example Controller"));
        assertThat(caps.isSetIdOverridden(), is(false));
        assertThat(caps.isSetNameOverridden(), is(false));
        assertThat(caps.isSetVersionOverridden(), is(false));
        assertThat(caps.isSetBuildInfoOverridden(), is(false));
        assertThat(caps.isSetBatteryAmpHourReported(), is(false));
        assertThat(caps.isSetLowPowerModeSupported(), is(false));
        assertThat(caps.isSetVoltageReported(), is(false));
        BufferedImage img= ImageIO.read(new ByteArrayInputStream(caps.getPrimaryImage().getValue()));
        int imHeight = img.getHeight();
        int imWidth = img.getWidth();
        assertThat(imHeight, is(128));
        assertThat(imWidth, is(128));        
    }
@ Test public void testGetCapabilities ( ) throws UnmarshalException , IOException { TerraHarvestController terraHarvestController = IntegrationTestRunner . getService ( TerraHarvestController . class ) ; assertThat ( terraHarvestController , is ( notNullValue ( ) ) ) ; ControllerCapabilities caps = terraHarvestController . getCapabilities ( ) ; assertThat ( caps , is ( notNullValue ( ) ) ) ; assertThat ( caps . getManufacturer ( ) , is ( "Unknown" ) ) ; assertThat ( caps . getDescription ( ) , is ( "Example Controller" ) ) ; assertThat ( caps . getProductName ( ) , is ( "Example Controller" ) ) ; assertThat ( caps . isSetIdOverridden ( ) , is ( false ) ) ; assertThat ( caps . isSetNameOverridden ( ) , is ( false ) ) ; assertThat ( caps . isSetVersionOverridden ( ) , is ( false ) ) ; assertThat ( caps . isSetBuildInfoOverridden ( ) , is ( false ) ) ; assertThat ( caps . isSetBatteryAmpHourReported ( ) , is ( false ) ) ; assertThat ( caps . isSetLowPowerModeSupported ( ) , is ( false ) ) ; assertThat ( caps . isSetVoltageReported ( ) , is ( false ) ) ; BufferedImage img = ImageIO . read ( new ByteArrayInputStream ( caps . getPrimaryImage ( ) . getValue ( ) ) ) ; int imHeight = img . getHeight ( ) ; int imWidth = img . getWidth ( ) ; assertThat ( imHeight , is ( 128 ) ) ; assertThat ( imWidth , is ( 128 ) ) ; }
Test for that the XML unmarshal service correctly reads and translates a capabilities XML file.
Test for that the XML unmarshal service correctly reads and translates a capabilities XML file .
// make sure that values are not even set