mil.dod.th.ose.datastream/test/mil/dod/th/ose/datastream/TestDataStreamServiceImpl.java
@Test
    public void testGetStreamProfiles() throws InvalidSyntaxException
    {
        Map<String, Object> props = new HashMap<String, Object>();
        props.put(DataStreamServiceConfig.CONFIG_PROP_MULTICAST_HOST, "225.1.2.3");
        props.put(DataStreamServiceConfig.CONFIG_PROP_START_PORT, 5004);
        
        m_SUT.activate(Collections.unmodifiableMap(props), m_BundleContext);
        
        Set<StreamProfileInternal> set = new HashSet<StreamProfileInternal>();
        set.add(mock(StreamProfileInternal.class));
        when(m_Registry.getObjects()).thenReturn(set);
        
        Set<StreamProfile> allStreamProfiles = m_SUT.getStreamProfiles();
        assertThat("Null retrieved from getStreamProfiles method", allStreamProfiles, is(notNullValue()));
        assertThat(allStreamProfiles.size(), is(1));
    }
/**
     * Verify that stream profiles are returned if they exist in the registry.
     */
Verify that stream profiles are returned if they exist in the registry.
Verify that stream profiles are returned if they exist in the registry .
@Test
    public void testGetStreamProfiles() throws InvalidSyntaxException
    {
        Map<String, Object> props = new HashMap<String, Object>();
        props.put(DataStreamServiceConfig.CONFIG_PROP_MULTICAST_HOST, "225.1.2.3");
        props.put(DataStreamServiceConfig.CONFIG_PROP_START_PORT, 5004);
        m_SUT.activate(Collections.unmodifiableMap(props), m_BundleContext);
        Set<StreamProfileInternal> set = new HashSet<StreamProfileInternal>();
        set.add(mock(StreamProfileInternal.class));
        when(m_Registry.getObjects()).thenReturn(set);
        Set<StreamProfile> allStreamProfiles = m_SUT.getStreamProfiles();
        assertThat("Null retrieved from getStreamProfiles method", allStreamProfiles, is(notNullValue()));
        assertThat(allStreamProfiles.size(), is(1));
    }
@ Test public void testGetStreamProfiles ( ) throws InvalidSyntaxException { Map < String , Object > props = new HashMap < String , Object > ( ) ; props . put ( DataStreamServiceConfig . CONFIG_PROP_MULTICAST_HOST , "225.1.2.3" ) ; props . put ( DataStreamServiceConfig . CONFIG_PROP_START_PORT , 5004 ) ; m_SUT . activate ( Collections . unmodifiableMap ( props ) , m_BundleContext ) ; Set < StreamProfileInternal > set = new HashSet < StreamProfileInternal > ( ) ; set . add ( mock ( StreamProfileInternal . class ) ) ; when ( m_Registry . getObjects ( ) ) . thenReturn ( set ) ; Set < StreamProfile > allStreamProfiles = m_SUT . getStreamProfiles ( ) ; assertThat ( "Null retrieved from getStreamProfiles method" , allStreamProfiles , is ( notNullValue ( ) ) ) ; assertThat ( allStreamProfiles . size ( ) , is ( 1 ) ) ; }
Verify that stream profiles are returned if they exist in the registry.
Verify that stream profiles are returned if they exist in the registry .