mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/asset/TestAssetModel.java
@Test
    public void testUniquenessOfWidgetVar()
    {
        //create first asset model
        AssetModel model1 = new AssetModel(123, m_Uuid, ASSET_PID, Asset.class.getName(), 
                m_FactoryMgr, m_ConfigWrapper, m_AssetTypesMgr, m_AssetImageInterface);
        String wid1 = model1.getWidgetVarName();
        assertThat(model1.getWidgetVarName(), is("editNameWid" + m_Uuid.toString().replace('-', 'R')));

        //create second asset model
        UUID uuid2 = UUID.randomUUID();
        AssetModel model2 = new AssetModel(123, uuid2, ASSET_PID, Asset.class.getName(), 
                m_FactoryMgr, m_ConfigWrapper, m_AssetTypesMgr, m_AssetImageInterface);
        String wid2 = model2.getWidgetVarName();
        assertThat(model2.getWidgetVarName(), is("editNameWid" +  uuid2.toString().replace('-', 'R')));

        //create third asset model
        UUID uuid3 = UUID.randomUUID();
        AssetModel model3 = new AssetModel(123, uuid3, ASSET_PID, Asset.class.getName(), 
                m_FactoryMgr, m_ConfigWrapper, m_AssetTypesMgr, m_AssetImageInterface);
        String wid3 = model3.getWidgetVarName();
        assertThat(model3.getWidgetVarName(), is("editNameWid" +  uuid3.toString().replace('-', 'R')));

        //verify unique values
        assertThat(wid1, not(wid2));
        assertThat(wid3, not(wid2));
        assertThat(wid1, not(wid3));
    }
/**
     * Test that the widget var is set at creation, and is unique for individual asset models.
     */
Test that the widget var is set at creation, and is unique for individual asset models.
Test that the widget var is set at creation and is unique for individual asset models .
@Test
    public void testUniquenessOfWidgetVar()
    {
        AssetModel model1 = new AssetModel(123, m_Uuid, ASSET_PID, Asset.class.getName(), 
                m_FactoryMgr, m_ConfigWrapper, m_AssetTypesMgr, m_AssetImageInterface);
        String wid1 = model1.getWidgetVarName();
        assertThat(model1.getWidgetVarName(), is("editNameWid" + m_Uuid.toString().replace('-', 'R')));
        UUID uuid2 = UUID.randomUUID();
        AssetModel model2 = new AssetModel(123, uuid2, ASSET_PID, Asset.class.getName(), 
                m_FactoryMgr, m_ConfigWrapper, m_AssetTypesMgr, m_AssetImageInterface);
        String wid2 = model2.getWidgetVarName();
        assertThat(model2.getWidgetVarName(), is("editNameWid" +  uuid2.toString().replace('-', 'R')));
        UUID uuid3 = UUID.randomUUID();
        AssetModel model3 = new AssetModel(123, uuid3, ASSET_PID, Asset.class.getName(), 
                m_FactoryMgr, m_ConfigWrapper, m_AssetTypesMgr, m_AssetImageInterface);
        String wid3 = model3.getWidgetVarName();
        assertThat(model3.getWidgetVarName(), is("editNameWid" +  uuid3.toString().replace('-', 'R')));
        assertThat(wid1, not(wid2));
        assertThat(wid3, not(wid2));
        assertThat(wid1, not(wid3));
    }
@ Test public void testUniquenessOfWidgetVar ( ) { AssetModel model1 = new AssetModel ( 123 , m_Uuid , ASSET_PID , Asset . class . getName ( ) , m_FactoryMgr , m_ConfigWrapper , m_AssetTypesMgr , m_AssetImageInterface ) ; String wid1 = model1 . getWidgetVarName ( ) ; assertThat ( model1 . getWidgetVarName ( ) , is ( "editNameWid" + m_Uuid . toString ( ) . replace ( '-' , 'R' ) ) ) ; UUID uuid2 = UUID . randomUUID ( ) ; AssetModel model2 = new AssetModel ( 123 , uuid2 , ASSET_PID , Asset . class . getName ( ) , m_FactoryMgr , m_ConfigWrapper , m_AssetTypesMgr , m_AssetImageInterface ) ; String wid2 = model2 . getWidgetVarName ( ) ; assertThat ( model2 . getWidgetVarName ( ) , is ( "editNameWid" + uuid2 . toString ( ) . replace ( '-' , 'R' ) ) ) ; UUID uuid3 = UUID . randomUUID ( ) ; AssetModel model3 = new AssetModel ( 123 , uuid3 , ASSET_PID , Asset . class . getName ( ) , m_FactoryMgr , m_ConfigWrapper , m_AssetTypesMgr , m_AssetImageInterface ) ; String wid3 = model3 . getWidgetVarName ( ) ; assertThat ( model3 . getWidgetVarName ( ) , is ( "editNameWid" + uuid3 . toString ( ) . replace ( '-' , 'R' ) ) ) ; assertThat ( wid1 , not ( wid2 ) ) ; assertThat ( wid3 , not ( wid2 ) ) ; assertThat ( wid1 , not ( wid3 ) ) ; }
Test that the widget var is set at creation, and is unique for individual asset models.
Test that the widget var is set at creation and is unique for individual asset models .
//create first asset model //create second asset model //create third asset model //verify unique values