mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/utils/TestArgumentValidatorUtil.java
@Test
    public void testConvertToActualType()
    {
        assertThat(ArgumentValidatorUtil.convertToActualType("125", Integer.class), is((Object)125));
        assertThat(ArgumentValidatorUtil.convertToActualType("1500", Long.class), is((Object)1500L));
        assertThat(ArgumentValidatorUtil.convertToActualType("12.25", Double.class), is((Object)12.25));
        assertThat(ArgumentValidatorUtil.convertToActualType("122.2", Float.class), is((Object)122.2F));
        assertThat(ArgumentValidatorUtil.convertToActualType("100", Byte.class), is((Object)(byte)100));
        assertThat(ArgumentValidatorUtil.convertToActualType("12", Short.class), is((Object)(short)12));
        assertThat(ArgumentValidatorUtil.convertToActualType("true", Boolean.class), is((Object)true));
        assertThat(ArgumentValidatorUtil.convertToActualType("C", Character.class), is((Object)'C'));
        assertThat(ArgumentValidatorUtil.convertToActualType("test", String.class), is((Object)"test"));
    }
/**
     * Verify that value's actual types are correctly converted from a string when the type is given. 
     */
Verify that value's actual types are correctly converted from a string when the type is given.
Verify that value ' s actual types are correctly converted from a string when the type is given .
@Test
    public void testConvertToActualType()
    {
        assertThat(ArgumentValidatorUtil.convertToActualType("125", Integer.class), is((Object)125));
        assertThat(ArgumentValidatorUtil.convertToActualType("1500", Long.class), is((Object)1500L));
        assertThat(ArgumentValidatorUtil.convertToActualType("12.25", Double.class), is((Object)12.25));
        assertThat(ArgumentValidatorUtil.convertToActualType("122.2", Float.class), is((Object)122.2F));
        assertThat(ArgumentValidatorUtil.convertToActualType("100", Byte.class), is((Object)(byte)100));
        assertThat(ArgumentValidatorUtil.convertToActualType("12", Short.class), is((Object)(short)12));
        assertThat(ArgumentValidatorUtil.convertToActualType("true", Boolean.class), is((Object)true));
        assertThat(ArgumentValidatorUtil.convertToActualType("C", Character.class), is((Object)'C'));
        assertThat(ArgumentValidatorUtil.convertToActualType("test", String.class), is((Object)"test"));
    }
@ Test public void testConvertToActualType ( ) { assertThat ( ArgumentValidatorUtil . convertToActualType ( "125" , Integer . class ) , is ( ( Object ) 125 ) ) ; assertThat ( ArgumentValidatorUtil . convertToActualType ( "1500" , Long . class ) , is ( ( Object ) 1500L ) ) ; assertThat ( ArgumentValidatorUtil . convertToActualType ( "12.25" , Double . class ) , is ( ( Object ) 12.25 ) ) ; assertThat ( ArgumentValidatorUtil . convertToActualType ( "122.2" , Float . class ) , is ( ( Object ) 122.2F ) ) ; assertThat ( ArgumentValidatorUtil . convertToActualType ( "100" , Byte . class ) , is ( ( Object ) ( byte ) 100 ) ) ; assertThat ( ArgumentValidatorUtil . convertToActualType ( "12" , Short . class ) , is ( ( Object ) ( short ) 12 ) ) ; assertThat ( ArgumentValidatorUtil . convertToActualType ( "true" , Boolean . class ) , is ( ( Object ) true ) ) ; assertThat ( ArgumentValidatorUtil . convertToActualType ( "C" , Character . class ) , is ( ( Object ) 'C' ) ) ; assertThat ( ArgumentValidatorUtil . convertToActualType ( "test" , String . class ) , is ( ( Object ) "test" ) ) ; }
Verify that value's actual types are correctly converted from a string when the type is given.
Verify that value ' s actual types are correctly converted from a string when the type is given .