mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/advanced/configuration/TestSystemMetatypeMgrImpl.java
private void verifyAttributes(List<AttributeModel> list)
    {
        assertThat(list.size(), is(3));
        List<String> idList = new ArrayList<String>();
        for (AttributeModel attribute: list)
        {
            idList.add(attribute.getId());
        }
        assertThat(idList, hasItems("intField", "stringField", "boolField"));
        AttributeModel attribute = list.get(idList.indexOf("intField"));
        assertThat(attribute.getName(), is("Int Field"));
        assertThat(attribute.getType(), is(AttributeDefinition.INTEGER));
        attribute = list.get(idList.indexOf("stringField"));
        assertThat(attribute.getName(), is("String Field"));
        assertThat(attribute.getType(), is(AttributeDefinition.STRING));
        attribute = list.get(idList.indexOf("boolField"));
        assertThat(attribute.getName(), is("Bool Field"));
        assertThat(attribute.getType(), is(AttributeDefinition.BOOLEAN));
    }
/**
     * Verify list of attributes contained in a model.
     */
Verify list of attributes contained in a model.
Verify list of attributes contained in a model .
private void verifyAttributes(List<AttributeModel> list)
    {
        assertThat(list.size(), is(3));
        List<String> idList = new ArrayList<String>();
        for (AttributeModel attribute: list)
        {
            idList.add(attribute.getId());
        }
        assertThat(idList, hasItems("intField", "stringField", "boolField"));
        AttributeModel attribute = list.get(idList.indexOf("intField"));
        assertThat(attribute.getName(), is("Int Field"));
        assertThat(attribute.getType(), is(AttributeDefinition.INTEGER));
        attribute = list.get(idList.indexOf("stringField"));
        assertThat(attribute.getName(), is("String Field"));
        assertThat(attribute.getType(), is(AttributeDefinition.STRING));
        attribute = list.get(idList.indexOf("boolField"));
        assertThat(attribute.getName(), is("Bool Field"));
        assertThat(attribute.getType(), is(AttributeDefinition.BOOLEAN));
    }
private void verifyAttributes ( List < AttributeModel > list ) { assertThat ( list . size ( ) , is ( 3 ) ) ; List < String > idList = new ArrayList < String > ( ) ; for ( AttributeModel attribute : list ) { idList . add ( attribute . getId ( ) ) ; } assertThat ( idList , hasItems ( "intField" , "stringField" , "boolField" ) ) ; AttributeModel attribute = list . get ( idList . indexOf ( "intField" ) ) ; assertThat ( attribute . getName ( ) , is ( "Int Field" ) ) ; assertThat ( attribute . getType ( ) , is ( AttributeDefinition . INTEGER ) ) ; attribute = list . get ( idList . indexOf ( "stringField" ) ) ; assertThat ( attribute . getName ( ) , is ( "String Field" ) ) ; assertThat ( attribute . getType ( ) , is ( AttributeDefinition . STRING ) ) ; attribute = list . get ( idList . indexOf ( "boolField" ) ) ; assertThat ( attribute . getName ( ) , is ( "Bool Field" ) ) ; assertThat ( attribute . getType ( ) , is ( AttributeDefinition . BOOLEAN ) ) ; }
Verify list of attributes contained in a model.
Verify list of attributes contained in a model .