mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/asset/TestAssetMgrImpl.java
@Test
    public void testHandleSetAssetPropertyResponse()
    {
        // properties for the event
        final Map<String, Object> props = new HashMap<String, Object>();
        props.put(RemoteConstants.EVENT_PROP_DATA_MESSAGE, null);
        props.put(RemoteConstants.EVENT_PROP_SOURCE_ID, 1);
        props.put(RemoteConstants.EVENT_PROP_DEST_ID, 0);
        props.put(RemoteConstants.EVENT_PROP_NAMESPACE, Namespace.Asset.toString());
        props.put(RemoteConstants.EVENT_PROP_MESSAGE_TYPE, 
            AssetMessageType.SetPropertyResponse.toString());
        
        //the event
        Event event = new Event(RemoteConstants.TOPIC_MESSAGE_RECEIVED, props);
        
        m_AssetHelper.handleEvent(event);
        
        verify(m_GrowlUtil).createGlobalFacesMessage(eq(FacesMessage.SEVERITY_INFO), eq("Properties Accepted:"),
                eq(String.format("Controller 0x%08x has accepted the list of properties.", 1)));
    }
/**
     * Verify an asset property response generates a message.
     */
Verify an asset property response generates a message.
Verify an asset property response generates a message .
@Test
    public void testHandleSetAssetPropertyResponse()
    {
        final Map<String, Object> props = new HashMap<String, Object>();
        props.put(RemoteConstants.EVENT_PROP_DATA_MESSAGE, null);
        props.put(RemoteConstants.EVENT_PROP_SOURCE_ID, 1);
        props.put(RemoteConstants.EVENT_PROP_DEST_ID, 0);
        props.put(RemoteConstants.EVENT_PROP_NAMESPACE, Namespace.Asset.toString());
        props.put(RemoteConstants.EVENT_PROP_MESSAGE_TYPE, 
            AssetMessageType.SetPropertyResponse.toString());
        Event event = new Event(RemoteConstants.TOPIC_MESSAGE_RECEIVED, props);
        m_AssetHelper.handleEvent(event);
        verify(m_GrowlUtil).createGlobalFacesMessage(eq(FacesMessage.SEVERITY_INFO), eq("Properties Accepted:"),
                eq(String.format("Controller 0x%08x has accepted the list of properties.", 1)));
    }
@ Test public void testHandleSetAssetPropertyResponse ( ) { final Map < String , Object > props = new HashMap < String , Object > ( ) ; props . put ( RemoteConstants . EVENT_PROP_DATA_MESSAGE , null ) ; props . put ( RemoteConstants . EVENT_PROP_SOURCE_ID , 1 ) ; props . put ( RemoteConstants . EVENT_PROP_DEST_ID , 0 ) ; props . put ( RemoteConstants . EVENT_PROP_NAMESPACE , Namespace . Asset . toString ( ) ) ; props . put ( RemoteConstants . EVENT_PROP_MESSAGE_TYPE , AssetMessageType . SetPropertyResponse . toString ( ) ) ; Event event = new Event ( RemoteConstants . TOPIC_MESSAGE_RECEIVED , props ) ; m_AssetHelper . handleEvent ( event ) ; verify ( m_GrowlUtil ) . createGlobalFacesMessage ( eq ( FacesMessage . SEVERITY_INFO ) , eq ( "Properties Accepted:" ) , eq ( String . format ( "Controller 0x%08x has accepted the list of properties." , 1 ) ) ) ; }
Verify an asset property response generates a message.
Verify an asset property response generates a message .
// properties for the event //the event