mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/asset/TestAssetSyncableCommandModel.java
@Test
    public void testGetCommandBySyncType()
    {
        Command command = m_SUT.getCommandBySyncType(CommandTypeEnum.GET_PAN_TILT_COMMAND);
        assertThat(command.getClass(), is((Object)SetPanTiltCommand.class));
        
        //Verify that it is a newly instantiated command and that the fields are not set.
        SetPanTiltCommand panTilt = (SetPanTiltCommand)command;
        assertThat(panTilt.isSetPanTilt(), is(false));
        
        //Set the fields.
        AzimuthDegrees pan = new AzimuthDegrees().withValue(5.2);
        ElevationDegrees tilt = new ElevationDegrees().withValue(12.1);
        panTilt.setPanTilt(new OrientationOffset().withAzimuth(pan).withElevation(tilt));
       
        command = m_SUT.getCommandBySyncType(CommandTypeEnum.GET_PAN_TILT_COMMAND);
        assertThat(command.getClass(), is((Object)SetPanTiltCommand.class));
        
        //Verify that it is a newly instantiated command is not returned and that the values match the previously 
        //received command.
        panTilt = (SetPanTiltCommand)command;
        OrientationOffset ptValues = panTilt.getPanTilt();
        assertThat(panTilt.isSetPanTilt(), is(true));
        assertThat(ptValues.isSetElevation(), is(true));
        assertThat(ptValues.isSetAzimuth(), is(true));
        assertThat(ptValues.getAzimuth(), is(pan));
        assertThat(ptValues.getElevation(), is(tilt));
    }
/**
     * Verify that the get command by sync type method returns a command of the appropriate type. Any further calls 
     * should return the previously instantiated command.
     */
Verify that the get command by sync type method returns a command of the appropriate type. Any further calls
should return the previously instantiated command.
Verify that the get command by sync type method returns a command of the appropriate type . Any further calls should return the previously instantiated command .
@Test
    public void testGetCommandBySyncType()
    {
        Command command = m_SUT.getCommandBySyncType(CommandTypeEnum.GET_PAN_TILT_COMMAND);
        assertThat(command.getClass(), is((Object)SetPanTiltCommand.class));
        SetPanTiltCommand panTilt = (SetPanTiltCommand)command;
        assertThat(panTilt.isSetPanTilt(), is(false));
        AzimuthDegrees pan = new AzimuthDegrees().withValue(5.2);
        ElevationDegrees tilt = new ElevationDegrees().withValue(12.1);
        panTilt.setPanTilt(new OrientationOffset().withAzimuth(pan).withElevation(tilt));
        command = m_SUT.getCommandBySyncType(CommandTypeEnum.GET_PAN_TILT_COMMAND);
        assertThat(command.getClass(), is((Object)SetPanTiltCommand.class));
        panTilt = (SetPanTiltCommand)command;
        OrientationOffset ptValues = panTilt.getPanTilt();
        assertThat(panTilt.isSetPanTilt(), is(true));
        assertThat(ptValues.isSetElevation(), is(true));
        assertThat(ptValues.isSetAzimuth(), is(true));
        assertThat(ptValues.getAzimuth(), is(pan));
        assertThat(ptValues.getElevation(), is(tilt));
    }
@ Test public void testGetCommandBySyncType ( ) { Command command = m_SUT . getCommandBySyncType ( CommandTypeEnum . GET_PAN_TILT_COMMAND ) ; assertThat ( command . getClass ( ) , is ( ( Object ) SetPanTiltCommand . class ) ) ; SetPanTiltCommand panTilt = ( SetPanTiltCommand ) command ; assertThat ( panTilt . isSetPanTilt ( ) , is ( false ) ) ; AzimuthDegrees pan = new AzimuthDegrees ( ) . withValue ( 5.2 ) ; ElevationDegrees tilt = new ElevationDegrees ( ) . withValue ( 12.1 ) ; panTilt . setPanTilt ( new OrientationOffset ( ) . withAzimuth ( pan ) . withElevation ( tilt ) ) ; command = m_SUT . getCommandBySyncType ( CommandTypeEnum . GET_PAN_TILT_COMMAND ) ; assertThat ( command . getClass ( ) , is ( ( Object ) SetPanTiltCommand . class ) ) ; panTilt = ( SetPanTiltCommand ) command ; OrientationOffset ptValues = panTilt . getPanTilt ( ) ; assertThat ( panTilt . isSetPanTilt ( ) , is ( true ) ) ; assertThat ( ptValues . isSetElevation ( ) , is ( true ) ) ; assertThat ( ptValues . isSetAzimuth ( ) , is ( true ) ) ; assertThat ( ptValues . getAzimuth ( ) , is ( pan ) ) ; assertThat ( ptValues . getElevation ( ) , is ( tilt ) ) ; }
Verify that the get command by sync type method returns a command of the appropriate type.
Verify that the get command by sync type method returns a command of the appropriate type .
//Verify that it is a newly instantiated command and that the fields are not set. //Set the fields. //Verify that it is a newly instantiated command is not returned and that the values match the previously  //received command.