mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/comms/TestCommsLayerTypesMgrImpl.java
private Event mockMessageGetCommsTypesResponse(final int systemId, CommType type)
    {
        List<String> classNames = new ArrayList<String>();
        classNames.add("class.name.one");
        classNames.add("class.name.two");
        classNames.add("class.name.three");        
        
        GetAvailableCommTypesResponseData response = GetAvailableCommTypesResponseData.newBuilder().
                addAllProductType(classNames).setCommType(type).build();
        
        // properties for the event
        final Map<String, Object> props = new HashMap<String, Object>();
        props.put(RemoteConstants.EVENT_PROP_DATA_MESSAGE, response);
        props.put(RemoteConstants.EVENT_PROP_SOURCE_ID, systemId);
        props.put(RemoteConstants.EVENT_PROP_DEST_ID, 0);
        props.put(RemoteConstants.EVENT_PROP_NAMESPACE, Namespace.CustomComms.toString());
        props.put(RemoteConstants.EVENT_PROP_MESSAGE_TYPE, 
            CustomCommsMessageType.GetAvailableCommTypesResponse.toString());
        //the event
        return new Event(RemoteConstants.TOPIC_MESSAGE_RECEIVED, props);
    }
/**
     * This method creates a GetAssetTypesResponse message.
     * @param systemId
     *     the system id to use
     * @return
     *     an event that represents the type of event expected to be posted when this type of message is received
     */
This method creates a GetAssetTypesResponse message.
@param systemId
the system id to use
@return
an event that represents the type of event expected to be posted when this type of message is received
This method creates a GetAssetTypesResponse message . @param systemId the system id to use @return an event that represents the type of event expected to be posted when this type of message is received
private Event mockMessageGetCommsTypesResponse(final int systemId, CommType type)
    {
        List<String> classNames = new ArrayList<String>();
        classNames.add("class.name.one");
        classNames.add("class.name.two");
        classNames.add("class.name.three");        
        GetAvailableCommTypesResponseData response = GetAvailableCommTypesResponseData.newBuilder().
                addAllProductType(classNames).setCommType(type).build();
        final Map<String, Object> props = new HashMap<String, Object>();
        props.put(RemoteConstants.EVENT_PROP_DATA_MESSAGE, response);
        props.put(RemoteConstants.EVENT_PROP_SOURCE_ID, systemId);
        props.put(RemoteConstants.EVENT_PROP_DEST_ID, 0);
        props.put(RemoteConstants.EVENT_PROP_NAMESPACE, Namespace.CustomComms.toString());
        props.put(RemoteConstants.EVENT_PROP_MESSAGE_TYPE, 
            CustomCommsMessageType.GetAvailableCommTypesResponse.toString());
        return new Event(RemoteConstants.TOPIC_MESSAGE_RECEIVED, props);
    }
private Event mockMessageGetCommsTypesResponse ( final int systemId , CommType type ) { List < String > classNames = new ArrayList < String > ( ) ; classNames . add ( "class.name.one" ) ; classNames . add ( "class.name.two" ) ; classNames . add ( "class.name.three" ) ; GetAvailableCommTypesResponseData response = GetAvailableCommTypesResponseData . newBuilder ( ) . addAllProductType ( classNames ) . setCommType ( type ) . build ( ) ; final Map < String , Object > props = new HashMap < String , Object > ( ) ; props . put ( RemoteConstants . EVENT_PROP_DATA_MESSAGE , response ) ; props . put ( RemoteConstants . EVENT_PROP_SOURCE_ID , systemId ) ; props . put ( RemoteConstants . EVENT_PROP_DEST_ID , 0 ) ; props . put ( RemoteConstants . EVENT_PROP_NAMESPACE , Namespace . CustomComms . toString ( ) ) ; props . put ( RemoteConstants . EVENT_PROP_MESSAGE_TYPE , CustomCommsMessageType . GetAvailableCommTypesResponse . toString ( ) ) ; return new Event ( RemoteConstants . TOPIC_MESSAGE_RECEIVED , props ) ; }
This method creates a GetAssetTypesResponse message.
This method creates a GetAssetTypesResponse message .
// properties for the event //the event