mil.dod.th.ose.sdk/test/mil/dod/th/ose/sdk/those/TestProjectPhysicalLinkCapabilities.java
@Test
    public void testGetCapabilities()
    {
        // get the byte array of the capabilities xml
        final byte[] capByte = ProjectPhysicalLinkCapabilities.getCapabilities(PhysicalLinkTypeEnum.SERIAL_PORT);

        // read the byte array to a string object, used as the string to test against
        String lineAccum = new String(capByte);

        // assert that each main tag contains the correct sub-tags and/or fields
        ProjectCapabilitiesUtils.assertTestPattern("<ns2:PhysicalLinkCapabilities", "</ns2:PhysicalLinkCapabilities>",
                "<primaryImage", lineAccum);
        ProjectCapabilitiesUtils.assertTestPattern("<ns2:PhysicalLinkCapabilities", "</ns2:PhysicalLinkCapabilities>",
                "<secondaryImages", lineAccum);
        ProjectCapabilitiesUtils.assertTestPattern("<ns2:PhysicalLinkCapabilities", "</ns2:PhysicalLinkCapabilities>",
                "linkType", lineAccum);
        ProjectCapabilitiesUtils.assertTestPattern("<ns2:PhysicalLinkCapabilities", "</ns2:PhysicalLinkCapabilities>",
                "productName", lineAccum);
        ProjectCapabilitiesUtils.assertTestPattern("<ns2:PhysicalLinkCapabilities", "</ns2:PhysicalLinkCapabilities>",
                "description", lineAccum);
        ProjectCapabilitiesUtils.assertTestPattern("<ns2:PhysicalLinkCapabilities", "</ns2:PhysicalLinkCapabilities>",
                "manufacturer", lineAccum);
        ProjectCapabilitiesUtils.assertTestPattern("<ns2:PhysicalLinkCapabilities", "</ns2:PhysicalLinkCapabilities>",
                "<ns2:serialPort", lineAccum);

        ProjectCapabilitiesUtils.assertTestPattern("<primaryImage", "/primaryImage>", "encoding", lineAccum);

        ProjectCapabilitiesUtils.assertTestPattern("<secondaryImages", "/secondaryImages>", "encoding", lineAccum);

        ProjectCapabilitiesUtils.assertTestPattern("<ns2:serialPort", "</ns2:serialPort>", "baudRateSupported",
                lineAccum);
        ProjectCapabilitiesUtils.assertTestPattern("<ns2:serialPort", "</ns2:serialPort>", "flowControl", lineAccum);
        ProjectCapabilitiesUtils.assertTestPattern("<ns2:serialPort", "</ns2:serialPort>", "parity", lineAccum);
        ProjectCapabilitiesUtils.assertTestPattern("<ns2:serialPort", "</ns2:serialPort>", "stopBitsSupported",
                lineAccum);
        ProjectCapabilitiesUtils.assertTestPattern("<ns2:serialPort", "</ns2:serialPort>", "dataBitsSupported",
                lineAccum);
    }
/**
     * Tests that the {@link ProjectPhysicalLinkCapabilities#getCapabilities(PhysicalLinkTypeEnum)}
     * returns an object containing the correct XML tags.
     */
Tests that the  ProjectPhysicalLinkCapabilities#getCapabilities(PhysicalLinkTypeEnum)
returns an object containing the correct XML tags.
Tests that the ProjectPhysicalLinkCapabilities#getCapabilities ( PhysicalLinkTypeEnum ) returns an object containing the correct XML tags .
@Test
    public void testGetCapabilities()
    {
        final byte[] capByte = ProjectPhysicalLinkCapabilities.getCapabilities(PhysicalLinkTypeEnum.SERIAL_PORT);
        String lineAccum = new String(capByte);
        ProjectCapabilitiesUtils.assertTestPattern("<ns2:PhysicalLinkCapabilities", "</ns2:PhysicalLinkCapabilities>",
                "<primaryImage", lineAccum);
        ProjectCapabilitiesUtils.assertTestPattern("<ns2:PhysicalLinkCapabilities", "</ns2:PhysicalLinkCapabilities>",
                "<secondaryImages", lineAccum);
        ProjectCapabilitiesUtils.assertTestPattern("<ns2:PhysicalLinkCapabilities", "</ns2:PhysicalLinkCapabilities>",
                "linkType", lineAccum);
        ProjectCapabilitiesUtils.assertTestPattern("<ns2:PhysicalLinkCapabilities", "</ns2:PhysicalLinkCapabilities>",
                "productName", lineAccum);
        ProjectCapabilitiesUtils.assertTestPattern("<ns2:PhysicalLinkCapabilities", "</ns2:PhysicalLinkCapabilities>",
                "description", lineAccum);
        ProjectCapabilitiesUtils.assertTestPattern("<ns2:PhysicalLinkCapabilities", "</ns2:PhysicalLinkCapabilities>",
                "manufacturer", lineAccum);
        ProjectCapabilitiesUtils.assertTestPattern("<ns2:PhysicalLinkCapabilities", "</ns2:PhysicalLinkCapabilities>",
                "<ns2:serialPort", lineAccum);
        ProjectCapabilitiesUtils.assertTestPattern("<primaryImage", "/primaryImage>", "encoding", lineAccum);
        ProjectCapabilitiesUtils.assertTestPattern("<secondaryImages", "/secondaryImages>", "encoding", lineAccum);
        ProjectCapabilitiesUtils.assertTestPattern("<ns2:serialPort", "</ns2:serialPort>", "baudRateSupported",
                lineAccum);
        ProjectCapabilitiesUtils.assertTestPattern("<ns2:serialPort", "</ns2:serialPort>", "flowControl", lineAccum);
        ProjectCapabilitiesUtils.assertTestPattern("<ns2:serialPort", "</ns2:serialPort>", "parity", lineAccum);
        ProjectCapabilitiesUtils.assertTestPattern("<ns2:serialPort", "</ns2:serialPort>", "stopBitsSupported",
                lineAccum);
        ProjectCapabilitiesUtils.assertTestPattern("<ns2:serialPort", "</ns2:serialPort>", "dataBitsSupported",
                lineAccum);
    }
@ Test public void testGetCapabilities ( ) { final byte [ ] capByte = ProjectPhysicalLinkCapabilities . getCapabilities ( PhysicalLinkTypeEnum . SERIAL_PORT ) ; String lineAccum = new String ( capByte ) ; ProjectCapabilitiesUtils . assertTestPattern ( "<ns2:PhysicalLinkCapabilities" , "</ns2:PhysicalLinkCapabilities>" , "<primaryImage" , lineAccum ) ; ProjectCapabilitiesUtils . assertTestPattern ( "<ns2:PhysicalLinkCapabilities" , "</ns2:PhysicalLinkCapabilities>" , "<secondaryImages" , lineAccum ) ; ProjectCapabilitiesUtils . assertTestPattern ( "<ns2:PhysicalLinkCapabilities" , "</ns2:PhysicalLinkCapabilities>" , "linkType" , lineAccum ) ; ProjectCapabilitiesUtils . assertTestPattern ( "<ns2:PhysicalLinkCapabilities" , "</ns2:PhysicalLinkCapabilities>" , "productName" , lineAccum ) ; ProjectCapabilitiesUtils . assertTestPattern ( "<ns2:PhysicalLinkCapabilities" , "</ns2:PhysicalLinkCapabilities>" , "description" , lineAccum ) ; ProjectCapabilitiesUtils . assertTestPattern ( "<ns2:PhysicalLinkCapabilities" , "</ns2:PhysicalLinkCapabilities>" , "manufacturer" , lineAccum ) ; ProjectCapabilitiesUtils . assertTestPattern ( "<ns2:PhysicalLinkCapabilities" , "</ns2:PhysicalLinkCapabilities>" , "<ns2:serialPort" , lineAccum ) ; ProjectCapabilitiesUtils . assertTestPattern ( "<primaryImage" , "/primaryImage>" , "encoding" , lineAccum ) ; ProjectCapabilitiesUtils . assertTestPattern ( "<secondaryImages" , "/secondaryImages>" , "encoding" , lineAccum ) ; ProjectCapabilitiesUtils . assertTestPattern ( "<ns2:serialPort" , "</ns2:serialPort>" , "baudRateSupported" , lineAccum ) ; ProjectCapabilitiesUtils . assertTestPattern ( "<ns2:serialPort" , "</ns2:serialPort>" , "flowControl" , lineAccum ) ; ProjectCapabilitiesUtils . assertTestPattern ( "<ns2:serialPort" , "</ns2:serialPort>" , "parity" , lineAccum ) ; ProjectCapabilitiesUtils . assertTestPattern ( "<ns2:serialPort" , "</ns2:serialPort>" , "stopBitsSupported" , lineAccum ) ; ProjectCapabilitiesUtils . assertTestPattern ( "<ns2:serialPort" , "</ns2:serialPort>" , "dataBitsSupported" , lineAccum ) ; }
Tests that the {@link ProjectPhysicalLinkCapabilities#getCapabilities(PhysicalLinkTypeEnum)}
 returns an object containing the correct XML tags.
Tests that the { @link ProjectPhysicalLinkCapabilities#getCapabilities ( PhysicalLinkTypeEnum ) } returns an object containing the correct XML tags .
// get the byte array of the capabilities xml // read the byte array to a string object, used as the string to test against // assert that each main tag contains the correct sub-tags and/or fields