mil.dod.th.ose.shared/test/mil/dod/th/ose/shared/TestSharedMessageUtils.java
@Test
    public void testConvertMaptoListSimpleTypesMapEntry()
    {
        Map<String, String> testMap = new HashMap<String, String>();
        testMap.put("testKey", "testValue");
        
        testMap.put("testKey1", "yup" );
        
        List<SimpleTypesMapEntry> listTest = SharedMessageUtils.convertStringMapToListSimpleTypesMapEntry(testMap);
        Dictionary<String, Multitype> entryMap = new Hashtable<String, Multitype>();
        
        for (SimpleTypesMapEntry entry:listTest)        
        {
            entryMap.put(entry.getKey(), entry.getValue());
        }

        assertThat(entryMap.get("testKey").getStringValue(),is("testValue"));
        assertThat(entryMap.get("testKey1").getStringValue(), is("yup"));
    }
/**
     * Test and verify that a Java native type Map object is properly converted to a list of SimpleTypesMapEntry.
     */
Test and verify that a Java native type Map object is properly converted to a list of SimpleTypesMapEntry.
Test and verify that a Java native type Map object is properly converted to a list of SimpleTypesMapEntry .
@Test
    public void testConvertMaptoListSimpleTypesMapEntry()
    {
        Map<String, String> testMap = new HashMap<String, String>();
        testMap.put("testKey", "testValue");
        testMap.put("testKey1", "yup" );
        List<SimpleTypesMapEntry> listTest = SharedMessageUtils.convertStringMapToListSimpleTypesMapEntry(testMap);
        Dictionary<String, Multitype> entryMap = new Hashtable<String, Multitype>();
        for (SimpleTypesMapEntry entry:listTest)        
        {
            entryMap.put(entry.getKey(), entry.getValue());
        }
        assertThat(entryMap.get("testKey").getStringValue(),is("testValue"));
        assertThat(entryMap.get("testKey1").getStringValue(), is("yup"));
    }
@ Test public void testConvertMaptoListSimpleTypesMapEntry ( ) { Map < String , String > testMap = new HashMap < String , String > ( ) ; testMap . put ( "testKey" , "testValue" ) ; testMap . put ( "testKey1" , "yup" ) ; List < SimpleTypesMapEntry > listTest = SharedMessageUtils . convertStringMapToListSimpleTypesMapEntry ( testMap ) ; Dictionary < String , Multitype > entryMap = new Hashtable < String , Multitype > ( ) ; for ( SimpleTypesMapEntry entry : listTest ) { entryMap . put ( entry . getKey ( ) , entry . getValue ( ) ) ; } assertThat ( entryMap . get ( "testKey" ) . getStringValue ( ) , is ( "testValue" ) ) ; assertThat ( entryMap . get ( "testKey1" ) . getStringValue ( ) , is ( "yup" ) ) ; }
Test and verify that a Java native type Map object is properly converted to a list of SimpleTypesMapEntry.
Test and verify that a Java native type Map object is properly converted to a list of SimpleTypesMapEntry .