Package org.jboss.test.server.profileservice.component.persistence.support

Examples of org.jboss.test.server.profileservice.component.persistence.support.TestDeployment


      ManagedObject mo = createDeploymentMO();
      PersistenceRoot root = getPersistenceFactory().addComponent(mo, component);
     
      root = restore(root);
     
      TestDeployment attachment = createDeploymentMetaData();
      getPersistenceFactory().restorePersistenceRoot(root, attachment, null);
     
      //
      assertEquals(3, attachment.getComponents().size());
   }
View Full Code Here


      assertNotNull(root.getComponents());
      // serialize / deserialize
      PersistenceRoot persisted = restore(root);
     
      // Create a new root attachment with empty components
      TestDeployment test = new TestDeployment();
      test.getComponents().add(createComponentMetaData("component1", null, null));
      test.getComponents().add(createComponentMetaData("component2", null, null));
      // Apply the persisted information, which should recreate the missing properties
      getPersistenceFactory().restorePersistenceRoot(persisted, test, null);
      assertFalse(test.getComponents().isEmpty());
     
      // Check if the properties are available again
      for(TestComponent restoredComponent : test.getComponents())
      {
         assertNotNull("null object name "+ restoredComponent.getName(), restoredComponent.getObjectName());
         assertNotNull("null composite "+ restoredComponent.getName(), restoredComponent.getComposite());
      }
   }
View Full Code Here

      TestMgtComponentImpl tComp1 = new TestMgtComponentImpl(component1);
      PersistenceRoot root = getPersistenceFactory().removeComponent(mo, tComp1);
      PersistenceRoot persisted = restore(root);

      // Check removed
      TestDeployment deployment = createDeploymentMetaData();
      getPersistenceFactory().restorePersistenceRoot(persisted, deployment, null);
      assertEquals(1, deployment.getComponents().size());
     
      // Reset
      root = getPersistenceFactory().resetComponent(persisted, mo, tComp1);
      persisted = restore(root);
      assertNull(persisted.getComponents());
View Full Code Here

      // Get the components
      ManagedObject mo = createDeploymentMO();

      PersistenceRoot root = new PersistenceRoot();
     
      TestDeployment deployment = updateName(root, mo, "change1");
      mo = getMOF().initManagedObject(deployment, null);
     
      deployment = updateName(root, mo, "change2");
      mo = getMOF().initManagedObject(deployment, null);
     
View Full Code Here

     
      component.getProperty("name").setValue(SimpleValueSupport.wrap(name));
      root = getPersistenceFactory().updateComponent(root, mo, new TestMgtComponentImpl(component));
      root = restore(root);
     
      TestDeployment deployment = createDeploymentMetaData();
      getPersistenceFactory().restorePersistenceRoot(root, deployment, null);
      return deployment;
   }
View Full Code Here

      return getMOF().initManagedObject(createDeploymentMetaData(), null);
   }
  
   protected TestDeployment createDeploymentMetaData() throws Exception
   {
      TestDeployment deployment = new TestDeployment();
      List<TestComponent> components = new ArrayList<TestComponent>();
      components.add(
            createComponentMetaData("component1",
                  new ObjectName("org.jboss:type=testComponent1"),
                  createCompositeMetaData("composite1", 'a', new Integer(1))));
      components.add(
            createComponentMetaData("component2",
                  new ObjectName("org.jboss:type=testComponent2"),
                  createCompositeMetaData("composite2", 'b', new Integer(2))));
      deployment.setComponents(components);
      return deployment;
   }
View Full Code Here

TOP

Related Classes of org.jboss.test.server.profileservice.component.persistence.support.TestDeployment

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.