mil.dod.th.ose.controller/test/mil/dod/th/ose/controller/impl/TestThoseVersionProviderImpl.java
@Test
    public final void testGetVersionMetadata() throws IOException
    {
        m_TmpProps.put(ThoseVersionProvider.BUILD_TYPE_PROP_NAME, ThoseVersionProvider.AUTOMATED_BUILD_TYPE);
        m_TmpProps.put(ThoseVersionProvider.BUILD_GIT_HASH, "af223d5ff23");
        m_TmpProps.put(ThoseVersionProvider.BUILD_BRANCH_PROP_NAME, "origin/feature/TH-2343-this-is-a-branch");
        
        //activate, sets build type and branch name, the latter of which only matters if an automated build
        m_SUT.activate(m_Context);
        
        m_InfoProps.put(ThoseVersionProvider.MAJOR_NUM_PROP_NAME, 1);
        m_InfoProps.put(ThoseVersionProvider.MINOR_NUM_PROP_NAME, 0);
        m_InfoProps.put(ThoseVersionProvider.PATCH_NUM_PROP_NAME, 0);
        m_InfoProps.put(ThoseVersionProvider.METADATA_PROP_NAME, "some-metadata");
        
        assertThat(m_SUT.getVersion(), is("1.0.0-origin/feature/TH-2343-this-is-a-branch.af223d5+some-metadata"));
    }
/**
     * Test version when metadata is supplied.
     */
Test version when metadata is supplied.
Test version when metadata is supplied .
@Test
    public final void testGetVersionMetadata() throws IOException
    {
        m_TmpProps.put(ThoseVersionProvider.BUILD_TYPE_PROP_NAME, ThoseVersionProvider.AUTOMATED_BUILD_TYPE);
        m_TmpProps.put(ThoseVersionProvider.BUILD_GIT_HASH, "af223d5ff23");
        m_TmpProps.put(ThoseVersionProvider.BUILD_BRANCH_PROP_NAME, "origin/feature/TH-2343-this-is-a-branch");
        m_SUT.activate(m_Context);
        m_InfoProps.put(ThoseVersionProvider.MAJOR_NUM_PROP_NAME, 1);
        m_InfoProps.put(ThoseVersionProvider.MINOR_NUM_PROP_NAME, 0);
        m_InfoProps.put(ThoseVersionProvider.PATCH_NUM_PROP_NAME, 0);
        m_InfoProps.put(ThoseVersionProvider.METADATA_PROP_NAME, "some-metadata");
        assertThat(m_SUT.getVersion(), is("1.0.0-origin/feature/TH-2343-this-is-a-branch.af223d5+some-metadata"));
    }
@ Test public final void testGetVersionMetadata ( ) throws IOException { m_TmpProps . put ( ThoseVersionProvider . BUILD_TYPE_PROP_NAME , ThoseVersionProvider . AUTOMATED_BUILD_TYPE ) ; m_TmpProps . put ( ThoseVersionProvider . BUILD_GIT_HASH , "af223d5ff23" ) ; m_TmpProps . put ( ThoseVersionProvider . BUILD_BRANCH_PROP_NAME , "origin/feature/TH-2343-this-is-a-branch" ) ; m_SUT . activate ( m_Context ) ; m_InfoProps . put ( ThoseVersionProvider . MAJOR_NUM_PROP_NAME , 1 ) ; m_InfoProps . put ( ThoseVersionProvider . MINOR_NUM_PROP_NAME , 0 ) ; m_InfoProps . put ( ThoseVersionProvider . PATCH_NUM_PROP_NAME , 0 ) ; m_InfoProps . put ( ThoseVersionProvider . METADATA_PROP_NAME , "some-metadata" ) ; assertThat ( m_SUT . getVersion ( ) , is ( "1.0.0-origin/feature/TH-2343-this-is-a-branch.af223d5+some-metadata" ) ) ; }
Test version when metadata is supplied.
Test version when metadata is supplied .
//activate, sets build type and branch name, the latter of which only matters if an automated build