mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/comms/TestPhysicalLinkTypeConverter.java
@Test
    public void testGetAsObject()
    {
        assertThat((PhysicalLinkTypeEnum)m_SUT.getAsObject(null, null, "GPIO"), is(PhysicalLinkTypeEnum.GPIO));
        assertThat((PhysicalLinkTypeEnum)m_SUT.getAsObject(null, null, "SPI"), is(PhysicalLinkTypeEnum.SPI));
        assertThat((PhysicalLinkTypeEnum)m_SUT.getAsObject(null, null, "Serial Port"), 
            is(PhysicalLinkTypeEnum.SERIAL_PORT));
        assertThat((PhysicalLinkTypeEnum)m_SUT.getAsObject(null, null, "I 2 C"), is(PhysicalLinkTypeEnum.I_2_C));
        // make sure null value doesn't cause exception
        assertThat((PhysicalLinkTypeEnum)m_SUT.getAsObject(null, null, null), is(nullValue()));
        // make sure empty string doesn't cause exception
        assertThat((PhysicalLinkTypeEnum)m_SUT.getAsObject(null, null, ""), is(nullValue()));
    }
/**
     * Verify translation from the string representation of {@link PhysicalLinkTypeEnum}s to actual physical link types.
     */
Verify translation from the string representation of  PhysicalLinkTypeEnums to actual physical link types.
Verify translation from the string representation of PhysicalLinkTypeEnums to actual physical link types .
@Test
    public void testGetAsObject()
    {
        assertThat((PhysicalLinkTypeEnum)m_SUT.getAsObject(null, null, "GPIO"), is(PhysicalLinkTypeEnum.GPIO));
        assertThat((PhysicalLinkTypeEnum)m_SUT.getAsObject(null, null, "SPI"), is(PhysicalLinkTypeEnum.SPI));
        assertThat((PhysicalLinkTypeEnum)m_SUT.getAsObject(null, null, "Serial Port"), 
            is(PhysicalLinkTypeEnum.SERIAL_PORT));
        assertThat((PhysicalLinkTypeEnum)m_SUT.getAsObject(null, null, "I 2 C"), is(PhysicalLinkTypeEnum.I_2_C));
        assertThat((PhysicalLinkTypeEnum)m_SUT.getAsObject(null, null, null), is(nullValue()));
        assertThat((PhysicalLinkTypeEnum)m_SUT.getAsObject(null, null, ""), is(nullValue()));
    }
@ Test public void testGetAsObject ( ) { assertThat ( ( PhysicalLinkTypeEnum ) m_SUT . getAsObject ( null , null , "GPIO" ) , is ( PhysicalLinkTypeEnum . GPIO ) ) ; assertThat ( ( PhysicalLinkTypeEnum ) m_SUT . getAsObject ( null , null , "SPI" ) , is ( PhysicalLinkTypeEnum . SPI ) ) ; assertThat ( ( PhysicalLinkTypeEnum ) m_SUT . getAsObject ( null , null , "Serial Port" ) , is ( PhysicalLinkTypeEnum . SERIAL_PORT ) ) ; assertThat ( ( PhysicalLinkTypeEnum ) m_SUT . getAsObject ( null , null , "I 2 C" ) , is ( PhysicalLinkTypeEnum . I_2_C ) ) ; assertThat ( ( PhysicalLinkTypeEnum ) m_SUT . getAsObject ( null , null , null ) , is ( nullValue ( ) ) ) ; assertThat ( ( PhysicalLinkTypeEnum ) m_SUT . getAsObject ( null , null , "" ) , is ( nullValue ( ) ) ) ; }
Verify translation from the string representation of {@link PhysicalLinkTypeEnum}s to actual physical link types.
Verify translation from the string representation of { @link PhysicalLinkTypeEnum } s to actual physical link types .
// make sure null value doesn't cause exception // make sure empty string doesn't cause exception