mil.dod.th.ose.sdk/test/mil/dod/th/ose/sdk/those/TestProjectGenerator.java
@Test
    public void testCreateI2C() throws Exception
    {
        // Stubbing
        when(m_Config.getTemplate(bndTemplateName)).thenReturn(m_BundleTemplate);
        when(m_Config.getTemplate("ExamplePhysicalLink.java.ftl")).thenReturn(m_FactoryObjectJavaTemplate);

        // Instantiated objects
        ProjectProperties projectProps = new ProjectProperties(null);
        projectProps.setProjectType(ProjectType.PROJECT_PHYLINK);
        projectProps.setPhysicalLinkTypeEnum(PhysicalLinkTypeEnum.I_2_C);
        final Map<String, Object> dataModel = projectProps.getProperties();
        PrintStream out = new PrintStream(System.out);
        ArgumentCaptor<Writer> outWriter = ArgumentCaptor.forClass(Writer.class);
        m_SUT.initialize(m_Config, out);

        // Method Call
        m_SUT.create(projectProps, m_ProjectDir);

        verifyCreation(dataModel, outWriter);
        verify(m_FileOutputStream).write(ProjectPhysicalLinkCapabilities.getCapabilities(PhysicalLinkTypeEnum.I_2_C));

        assertThat(projectProps.getProperties(), hasEntry(ProjectProperties.PROP_ATTR_TYPE, (Object)"PhysicalLink"));
        assertThat(projectProps.getProperties(), hasEntry(ProjectProperties.PROP_PROXY_TYPE, (Object)"PhysicalLink"));
        assertThat(projectProps.getProperties(), hasEntry(ProjectProperties.PROP_PL_EXTRA_CODE, (Object)""));
    }
/**
     * Test that creating a physical link plug-in project will process the correct files.
     * 
     * Verify the data model is correctly passed in to the process call.
     * 
     * Verify the correct BND template file and Java templates are used.
     */
Test that creating a physical link plug-in project will process the correct files.

Verify the data model is correctly passed in to the process call.

Verify the correct BND template file and Java templates are used.
Test that creating a physical link plug - in project will process the correct files . Verify the data model is correctly passed in to the process call . Verify the correct BND template file and Java templates are used .
@Test
    public void testCreateI2C() throws Exception
    {
        when(m_Config.getTemplate(bndTemplateName)).thenReturn(m_BundleTemplate);
        when(m_Config.getTemplate("ExamplePhysicalLink.java.ftl")).thenReturn(m_FactoryObjectJavaTemplate);
        ProjectProperties projectProps = new ProjectProperties(null);
        projectProps.setProjectType(ProjectType.PROJECT_PHYLINK);
        projectProps.setPhysicalLinkTypeEnum(PhysicalLinkTypeEnum.I_2_C);
        final Map<String, Object> dataModel = projectProps.getProperties();
        PrintStream out = new PrintStream(System.out);
        ArgumentCaptor<Writer> outWriter = ArgumentCaptor.forClass(Writer.class);
        m_SUT.initialize(m_Config, out);
        m_SUT.create(projectProps, m_ProjectDir);
        verifyCreation(dataModel, outWriter);
        verify(m_FileOutputStream).write(ProjectPhysicalLinkCapabilities.getCapabilities(PhysicalLinkTypeEnum.I_2_C));
        assertThat(projectProps.getProperties(), hasEntry(ProjectProperties.PROP_ATTR_TYPE, (Object)"PhysicalLink"));
        assertThat(projectProps.getProperties(), hasEntry(ProjectProperties.PROP_PROXY_TYPE, (Object)"PhysicalLink"));
        assertThat(projectProps.getProperties(), hasEntry(ProjectProperties.PROP_PL_EXTRA_CODE, (Object)""));
    }
@ Test public void testCreateI2C ( ) throws Exception { when ( m_Config . getTemplate ( bndTemplateName ) ) . thenReturn ( m_BundleTemplate ) ; when ( m_Config . getTemplate ( "ExamplePhysicalLink.java.ftl" ) ) . thenReturn ( m_FactoryObjectJavaTemplate ) ; ProjectProperties projectProps = new ProjectProperties ( null ) ; projectProps . setProjectType ( ProjectType . PROJECT_PHYLINK ) ; projectProps . setPhysicalLinkTypeEnum ( PhysicalLinkTypeEnum . I_2_C ) ; final Map < String , Object > dataModel = projectProps . getProperties ( ) ; PrintStream out = new PrintStream ( System . out ) ; ArgumentCaptor < Writer > outWriter = ArgumentCaptor . forClass ( Writer . class ) ; m_SUT . initialize ( m_Config , out ) ; m_SUT . create ( projectProps , m_ProjectDir ) ; verifyCreation ( dataModel , outWriter ) ; verify ( m_FileOutputStream ) . write ( ProjectPhysicalLinkCapabilities . getCapabilities ( PhysicalLinkTypeEnum . I_2_C ) ) ; assertThat ( projectProps . getProperties ( ) , hasEntry ( ProjectProperties . PROP_ATTR_TYPE , ( Object ) "PhysicalLink" ) ) ; assertThat ( projectProps . getProperties ( ) , hasEntry ( ProjectProperties . PROP_PROXY_TYPE , ( Object ) "PhysicalLink" ) ) ; assertThat ( projectProps . getProperties ( ) , hasEntry ( ProjectProperties . PROP_PL_EXTRA_CODE , ( Object ) "" ) ) ; }
Test that creating a physical link plug-in project will process the correct files.
Test that creating a physical link plug - in project will process the correct files .
// Stubbing // Instantiated objects // Method Call