mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/advanced/TestBundleModel.java
@Test
    public void testUpdateBundle()
    {
        //New bundle information.
        long id = 1L;
        String desc = "New Description";
        String loc = "New Location";
        String name = "New Name";
        String symbName = "New Symbolic Name";
        String vendor = "New Vendor";
        String version = "3.0";
        
        
        BundleInfoType.Builder builderType = BundleInfoType.newBuilder();
        
        builderType.setBundleId(id);
        builderType.setBundleDescription(desc);
        builderType.setBundleLocation(loc);
        builderType.setBundleName(name);
        builderType.setBundleState(Bundle.ACTIVE);
        builderType.setBundleSymbolicName(symbName);
        builderType.setBundleVendor(vendor);
        builderType.setBundleVersion(version);
        
        List<String> exports = new ArrayList<String>();
        exports.add("Export 1");
        exports.add("Export 2");
        
        builderType.addAllPackageExport(exports);
        
        List<String> imports = new ArrayList<String>();
        imports.add("Import 1");
        imports.add("Import 2");
        
        builderType.addAllPackageImport(imports);
        
        //Replay
        m_SUT.updateBundle(builderType.build());
        
        //Verify that the fields within the bundle are set correctly.
        assertThat(m_SUT.getBundleId(), is(id));
        assertThat(m_SUT.getDescription(), is(desc));
        assertThat(m_SUT.getLocation(), is(loc));
        assertThat(m_SUT.getBundleName(), is(name));
        assertThat(m_SUT.getState(), is("Active"));
        assertThat(m_SUT.getSymbolicName(), is(symbName));
        assertThat(m_SUT.getBundleVendor(), is(vendor));
        assertThat(m_SUT.getVersion(), is(version));
        assertThat(m_SUT.getImportPackages(), is(imports));
        assertThat(m_SUT.getExportPackages(), is(exports));
    }
/**
     * Test updating the bundle.
     * Verify that all the fields within the bundle are updated accordingly.
     */
Test updating the bundle.
Verify that all the fields within the bundle are updated accordingly.
Test updating the bundle . Verify that all the fields within the bundle are updated accordingly .
@Test
    public void testUpdateBundle()
    {
        long id = 1L;
        String desc = "New Description";
        String loc = "New Location";
        String name = "New Name";
        String symbName = "New Symbolic Name";
        String vendor = "New Vendor";
        String version = "3.0";
        BundleInfoType.Builder builderType = BundleInfoType.newBuilder();
        builderType.setBundleId(id);
        builderType.setBundleDescription(desc);
        builderType.setBundleLocation(loc);
        builderType.setBundleName(name);
        builderType.setBundleState(Bundle.ACTIVE);
        builderType.setBundleSymbolicName(symbName);
        builderType.setBundleVendor(vendor);
        builderType.setBundleVersion(version);
        List<String> exports = new ArrayList<String>();
        exports.add("Export 1");
        exports.add("Export 2");
        builderType.addAllPackageExport(exports);
        List<String> imports = new ArrayList<String>();
        imports.add("Import 1");
        imports.add("Import 2");
        builderType.addAllPackageImport(imports);
        m_SUT.updateBundle(builderType.build());
        assertThat(m_SUT.getBundleId(), is(id));
        assertThat(m_SUT.getDescription(), is(desc));
        assertThat(m_SUT.getLocation(), is(loc));
        assertThat(m_SUT.getBundleName(), is(name));
        assertThat(m_SUT.getState(), is("Active"));
        assertThat(m_SUT.getSymbolicName(), is(symbName));
        assertThat(m_SUT.getBundleVendor(), is(vendor));
        assertThat(m_SUT.getVersion(), is(version));
        assertThat(m_SUT.getImportPackages(), is(imports));
        assertThat(m_SUT.getExportPackages(), is(exports));
    }
@ Test public void testUpdateBundle ( ) { long id = 1L ; String desc = "New Description" ; String loc = "New Location" ; String name = "New Name" ; String symbName = "New Symbolic Name" ; String vendor = "New Vendor" ; String version = "3.0" ; BundleInfoType . Builder builderType = BundleInfoType . newBuilder ( ) ; builderType . setBundleId ( id ) ; builderType . setBundleDescription ( desc ) ; builderType . setBundleLocation ( loc ) ; builderType . setBundleName ( name ) ; builderType . setBundleState ( Bundle . ACTIVE ) ; builderType . setBundleSymbolicName ( symbName ) ; builderType . setBundleVendor ( vendor ) ; builderType . setBundleVersion ( version ) ; List < String > exports = new ArrayList < String > ( ) ; exports . add ( "Export 1" ) ; exports . add ( "Export 2" ) ; builderType . addAllPackageExport ( exports ) ; List < String > imports = new ArrayList < String > ( ) ; imports . add ( "Import 1" ) ; imports . add ( "Import 2" ) ; builderType . addAllPackageImport ( imports ) ; m_SUT . updateBundle ( builderType . build ( ) ) ; assertThat ( m_SUT . getBundleId ( ) , is ( id ) ) ; assertThat ( m_SUT . getDescription ( ) , is ( desc ) ) ; assertThat ( m_SUT . getLocation ( ) , is ( loc ) ) ; assertThat ( m_SUT . getBundleName ( ) , is ( name ) ) ; assertThat ( m_SUT . getState ( ) , is ( "Active" ) ) ; assertThat ( m_SUT . getSymbolicName ( ) , is ( symbName ) ) ; assertThat ( m_SUT . getBundleVendor ( ) , is ( vendor ) ) ; assertThat ( m_SUT . getVersion ( ) , is ( version ) ) ; assertThat ( m_SUT . getImportPackages ( ) , is ( imports ) ) ; assertThat ( m_SUT . getExportPackages ( ) , is ( exports ) ) ; }
Test updating the bundle.
Test updating the bundle .
//New bundle information. //Replay //Verify that the fields within the bundle are set correctly.