mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/asset/TestAssetGetCommandModel.java
@Test
    public void testUpdateSupportedCommands()
    {
        List<CommandTypeEnum> types = new ArrayList<CommandTypeEnum>();
        types.add(CommandTypeEnum.GET_VERSION_COMMAND);
        
        m_SUT = new AssetGetCommandModel(m_Uuid, types);
        
        List<CommandTypeEnum> answer = m_SUT.getSupportedCommands();
        assertThat(answer.size(), is(1));
        assertThat(answer.get(0), is(CommandTypeEnum.GET_VERSION_COMMAND));
        
        types.clear();
        types.add(CommandTypeEnum.GET_PROFILES_COMMAND);
        types.add(CommandTypeEnum.GET_TUNE_SETTINGS_COMMAND);
        
        m_SUT.updateSupportedCommands(types);
        
        answer = m_SUT.getSupportedCommands();
        assertThat(answer.size(), is(2));
        assertThat(answer, containsInAnyOrder(CommandTypeEnum.GET_PROFILES_COMMAND, 
                CommandTypeEnum.GET_TUNE_SETTINGS_COMMAND));
    }
/**
     * Verify that the list of supported commands is updated appropriately.
     */
Verify that the list of supported commands is updated appropriately.
Verify that the list of supported commands is updated appropriately .
@Test
    public void testUpdateSupportedCommands()
    {
        List<CommandTypeEnum> types = new ArrayList<CommandTypeEnum>();
        types.add(CommandTypeEnum.GET_VERSION_COMMAND);
        m_SUT = new AssetGetCommandModel(m_Uuid, types);
        List<CommandTypeEnum> answer = m_SUT.getSupportedCommands();
        assertThat(answer.size(), is(1));
        assertThat(answer.get(0), is(CommandTypeEnum.GET_VERSION_COMMAND));
        types.clear();
        types.add(CommandTypeEnum.GET_PROFILES_COMMAND);
        types.add(CommandTypeEnum.GET_TUNE_SETTINGS_COMMAND);
        m_SUT.updateSupportedCommands(types);
        answer = m_SUT.getSupportedCommands();
        assertThat(answer.size(), is(2));
        assertThat(answer, containsInAnyOrder(CommandTypeEnum.GET_PROFILES_COMMAND, 
                CommandTypeEnum.GET_TUNE_SETTINGS_COMMAND));
    }
@ Test public void testUpdateSupportedCommands ( ) { List < CommandTypeEnum > types = new ArrayList < CommandTypeEnum > ( ) ; types . add ( CommandTypeEnum . GET_VERSION_COMMAND ) ; m_SUT = new AssetGetCommandModel ( m_Uuid , types ) ; List < CommandTypeEnum > answer = m_SUT . getSupportedCommands ( ) ; assertThat ( answer . size ( ) , is ( 1 ) ) ; assertThat ( answer . get ( 0 ) , is ( CommandTypeEnum . GET_VERSION_COMMAND ) ) ; types . clear ( ) ; types . add ( CommandTypeEnum . GET_PROFILES_COMMAND ) ; types . add ( CommandTypeEnum . GET_TUNE_SETTINGS_COMMAND ) ; m_SUT . updateSupportedCommands ( types ) ; answer = m_SUT . getSupportedCommands ( ) ; assertThat ( answer . size ( ) , is ( 2 ) ) ; assertThat ( answer , containsInAnyOrder ( CommandTypeEnum . GET_PROFILES_COMMAND , CommandTypeEnum . GET_TUNE_SETTINGS_COMMAND ) ) ; }
Verify that the list of supported commands is updated appropriately.
Verify that the list of supported commands is updated appropriately .