mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/asset/TestAssetModel.java
@Test
    public void testToggleLocation()
    {
        AssetModel model = new AssetModel(0, m_Uuid, ASSET_PID, Asset.class.getName(), 
                m_FactoryMgr, m_ConfigWrapper, m_AssetTypesMgr, m_AssetImageInterface);
        
        //verify default
        assertThat(model.isLocationToggle(), is(false));
        
        //create toggle event, this event is fired when the location is collapsed
        ToggleEvent event = mock(ToggleEvent.class);
        when(event.getVisibility()).thenReturn(Visibility.HIDDEN);
        model.setLocationToggle(event);
        
        //verify change
        assertThat(model.isLocationToggle(), is(true));
        
        //create an open toggle event, this event is fired when the location is opened
        when(event.getVisibility()).thenReturn(Visibility.VISIBLE);
        model.setLocationToggle(event);
        
         //verify reset
        assertThat(model.isLocationToggle(), is(false));
    }
/**
     * Verify that the toggle location state is properly translated.
     */
Verify that the toggle location state is properly translated.
Verify that the toggle location state is properly translated .
@Test
    public void testToggleLocation()
    {
        AssetModel model = new AssetModel(0, m_Uuid, ASSET_PID, Asset.class.getName(), 
                m_FactoryMgr, m_ConfigWrapper, m_AssetTypesMgr, m_AssetImageInterface);
        assertThat(model.isLocationToggle(), is(false));
        ToggleEvent event = mock(ToggleEvent.class);
        when(event.getVisibility()).thenReturn(Visibility.HIDDEN);
        model.setLocationToggle(event);
        assertThat(model.isLocationToggle(), is(true));
        when(event.getVisibility()).thenReturn(Visibility.VISIBLE);
        model.setLocationToggle(event);
        assertThat(model.isLocationToggle(), is(false));
    }
@ Test public void testToggleLocation ( ) { AssetModel model = new AssetModel ( 0 , m_Uuid , ASSET_PID , Asset . class . getName ( ) , m_FactoryMgr , m_ConfigWrapper , m_AssetTypesMgr , m_AssetImageInterface ) ; assertThat ( model . isLocationToggle ( ) , is ( false ) ) ; ToggleEvent event = mock ( ToggleEvent . class ) ; when ( event . getVisibility ( ) ) . thenReturn ( Visibility . HIDDEN ) ; model . setLocationToggle ( event ) ; assertThat ( model . isLocationToggle ( ) , is ( true ) ) ; when ( event . getVisibility ( ) ) . thenReturn ( Visibility . VISIBLE ) ; model . setLocationToggle ( event ) ; assertThat ( model . isLocationToggle ( ) , is ( false ) ) ; }
Verify that the toggle location state is properly translated.
Verify that the toggle location state is properly translated .
//verify default //create toggle event, this event is fired when the location is collapsed //verify change //create an open toggle event, this event is fired when the location is opened //verify reset