Skip to content

Commit

Permalink
Cleanup deprecated test API usages
Browse files Browse the repository at this point in the history
  • Loading branch information
ctomc authored and bstansberry committed Jan 7, 2013
1 parent 2842b79 commit a64e95c
Show file tree
Hide file tree
Showing 12 changed files with 58 additions and 54 deletions.
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -156,10 +156,10 @@ public void testDescribeHandler() throws Exception {
ModelNode describeOp = new ModelNode(); ModelNode describeOp = new ModelNode();
describeOp.get(OP).set(DESCRIBE); describeOp.get(OP).set(DESCRIBE);
describeOp.get(OP_ADDR).set(PathAddress.pathAddress(PathElement.pathElement(SUBSYSTEM, getMainSubsystemName())).toModelNode()); describeOp.get(OP_ADDR).set(PathAddress.pathAddress(PathElement.pathElement(SUBSYSTEM, getMainSubsystemName())).toModelNode());
List<ModelNode> operations = super.checkResultAndGetContents(servicesA.executeOperation(describeOp)).asList(); List<ModelNode> operations = checkResultAndGetContents(servicesA.executeOperation(describeOp)).asList();


// Install the describe options from the first controller into a second controller // Install the describe options from the first controller into a second controller
KernelServices servicesB = super.installInController(operations); KernelServices servicesB = createKernelServicesBuilder(null).setBootOperations(operations).build();
ModelNode modelB = servicesB.readWholeModel(); ModelNode modelB = servicesB.readWholeModel();


// Make sure the models from the two controllers are identical // Make sure the models from the two controllers are identical
Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -87,15 +87,19 @@ public void testReadWriteEmptySubsystem() throws Exception {


@Test @Test
public void testDescribeHandler() throws Exception { public void testDescribeHandler() throws Exception {
KernelServices servicesA = installInController(AdditionalInitialization.MANAGEMENT, SUBSYSTEM_XML_1_0_1); KernelServices servicesA = createKernelServicesBuilder(AdditionalInitialization.MANAGEMENT)
.setSubsystemXml(SUBSYSTEM_XML_1_0_1)
.build();
ModelNode modelA = servicesA.readWholeModel(); ModelNode modelA = servicesA.readWholeModel();
ModelNode describeOp = new ModelNode(); ModelNode describeOp = new ModelNode();
describeOp.get(ModelDescriptionConstants.OP).set(ModelDescriptionConstants.DESCRIBE); describeOp.get(ModelDescriptionConstants.OP).set(ModelDescriptionConstants.DESCRIBE);
describeOp.get(ModelDescriptionConstants.OP_ADDR).set( describeOp.get(ModelDescriptionConstants.OP_ADDR).set(
PathAddress.pathAddress(PathElement.pathElement(ModelDescriptionConstants.SUBSYSTEM, ConfigAdminExtension.SUBSYSTEM_NAME)).toModelNode()); PathAddress.pathAddress(PathElement.pathElement(ModelDescriptionConstants.SUBSYSTEM, ConfigAdminExtension.SUBSYSTEM_NAME)).toModelNode());
List<ModelNode> operations = checkResultAndGetContents(servicesA.executeOperation(describeOp)).asList(); List<ModelNode> operations = checkResultAndGetContents(servicesA.executeOperation(describeOp)).asList();


KernelServices servicesB = installInController(AdditionalInitialization.MANAGEMENT, operations); KernelServices servicesB = createKernelServicesBuilder(AdditionalInitialization.MANAGEMENT)
.setBootOperations(operations)
.build();
ModelNode modelB = servicesB.readWholeModel(); ModelNode modelB = servicesB.readWholeModel();


compare(modelA, modelB); compare(modelA, modelB);
Expand Down Expand Up @@ -135,12 +139,6 @@ public void testTransformers1_0_0() throws Exception {
Assert.assertEquals("testingabc", entries.get("test456").asString()); Assert.assertEquals("testingabc", entries.get("test456").asString());
} }


private void assertOSGiSubsystemAddress(ModelNode address) {
PathAddress addr = PathAddress.pathAddress(address);
PathElement element = addr.getElement(0);
Assert.assertEquals(ModelDescriptionConstants.SUBSYSTEM, element.getKey());
Assert.assertEquals(ConfigAdminExtension.SUBSYSTEM_NAME, element.getValue());
}


protected AdditionalInitialization createAdditionalInitialization() { protected AdditionalInitialization createAdditionalInitialization() {
return AdditionalInitialization.MANAGEMENT; return AdditionalInitialization.MANAGEMENT;
Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@




import junit.framework.Assert; import junit.framework.Assert;

import org.jboss.as.connector.util.ConnectorServices; import org.jboss.as.connector.util.ConnectorServices;
import org.jboss.as.controller.Extension; import org.jboss.as.controller.Extension;
import org.jboss.as.subsystem.test.AbstractSubsystemTest; import org.jboss.as.subsystem.test.AbstractSubsystemTest;
Expand Down Expand Up @@ -53,7 +52,9 @@ public ModelNode getModel(String resourceFileName, boolean checkMarshalledXML, S


String xml = readResource(resourceFileName); String xml = readResource(resourceFileName);


KernelServices services = super.installInController(AdditionalInitialization.MANAGEMENT, xml); KernelServices services = createKernelServicesBuilder(AdditionalInitialization.MANAGEMENT)
.setSubsystemXml(xml)
.build();


ModelNode model = services.readWholeModel(); ModelNode model = services.readWholeModel();
if (archiveName!=null) if (archiveName!=null)
Expand All @@ -64,7 +65,9 @@ public ModelNode getModel(String resourceFileName, boolean checkMarshalledXML, S
if (checkMarshalledXML) if (checkMarshalledXML)
Assert.assertEquals(normalizeXML(xml), normalizeXML(marshalled)); Assert.assertEquals(normalizeXML(xml), normalizeXML(marshalled));


services = super.installInController(AdditionalInitialization.MANAGEMENT, marshalled); services = createKernelServicesBuilder(AdditionalInitialization.MANAGEMENT)
.setSubsystemXml(marshalled)
.build();


// Check that the model looks the same // Check that the model looks the same
ModelNode modelReloaded = services.readWholeModel(); ModelNode modelReloaded = services.readWholeModel();
Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -178,21 +178,23 @@ protected void setupController(ControllerInitializer controllerInitializer) {
} }
}; };


KernelServices servicesA = super.installInController(additionalInit, subsystemXml); KernelServices servicesA = createKernelServicesBuilder(additionalInit)
.setSubsystemXml(subsystemXml)
.build();
// get the model and the describe operations from the first controller. // get the model and the describe operations from the first controller.
ModelNode modelA = servicesA.readWholeModel(); ModelNode modelA = servicesA.readWholeModel();
ModelNode describeOp = new ModelNode(); ModelNode describeOp = new ModelNode();
describeOp.get(OP).set(DESCRIBE); describeOp.get(OP).set(DESCRIBE);
describeOp.get(OP_ADDR).set( describeOp.get(OP_ADDR).set(
PathAddress.pathAddress( PathAddress.pathAddress(
PathElement.pathElement(SUBSYSTEM, JacORBExtension.SUBSYSTEM_NAME)).toModelNode()); PathElement.pathElement(SUBSYSTEM, JacORBExtension.SUBSYSTEM_NAME)).toModelNode());
List<ModelNode> operations = super.checkResultAndGetContents(servicesA.executeOperation(describeOp)).asList(); List<ModelNode> operations = checkResultAndGetContents(servicesA.executeOperation(describeOp)).asList();
servicesA.shutdown(); servicesA.shutdown();


Assert.assertEquals(1, operations.size()); Assert.assertEquals(1, operations.size());


// install the describe options from the first controller into a second controller. // install the describe options from the first controller into a second controller.
KernelServices servicesB = super.installInController(additionalInit, operations); KernelServices servicesB = createKernelServicesBuilder(additionalInit).setBootOperations(operations).build();
ModelNode modelB = servicesB.readWholeModel(); ModelNode modelB = servicesB.readWholeModel();
servicesB.shutdown(); servicesB.shutdown();


Expand Down
38 changes: 20 additions & 18 deletions jmx/src/test/java/org/jboss/as/jmx/JMXSubsystemTestCase.java
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ public void testInstallIntoController() throws Exception {
"<subsystem xmlns=\"" + Namespace.CURRENT.getUriString() + "\">" + "<subsystem xmlns=\"" + Namespace.CURRENT.getUriString() + "\">" +
"<remoting-connector/>" + "<remoting-connector/>" +
"</subsystem>"; "</subsystem>";
KernelServices services = super.installInController(new BaseAdditionalInitalization(),subsystemXml); KernelServices services = createKernelServicesBuilder(new BaseAdditionalInitalization())
.setSubsystemXml(subsystemXml)
.build();


//Read the whole model and make sure it looks as expected //Read the whole model and make sure it looks as expected
ModelNode model = services.readWholeModel(); ModelNode model = services.readWholeModel();
Expand Down Expand Up @@ -229,7 +231,7 @@ public void testParseAndMarshalModel1_0() throws Exception {
"<subsystem xmlns=\"" + Namespace.JMX_1_0.getUriString() + "\"/>"; "<subsystem xmlns=\"" + Namespace.JMX_1_0.getUriString() + "\"/>";
AdditionalInitialization additionalInit = new BaseAdditionalInitalization(); AdditionalInitialization additionalInit = new BaseAdditionalInitalization();


KernelServices servicesA = super.installInController(additionalInit, subsystemXml); KernelServices servicesA = createKernelServicesBuilder(additionalInit).setSubsystemXml(subsystemXml).build();
//Get the model and the persisted xml from the first controller //Get the model and the persisted xml from the first controller
ModelNode modelA = servicesA.readWholeModel(); ModelNode modelA = servicesA.readWholeModel();
String marshalled = servicesA.getPersistedSubsystemXml(); String marshalled = servicesA.getPersistedSubsystemXml();
Expand All @@ -240,7 +242,7 @@ public void testParseAndMarshalModel1_0() throws Exception {
compareXml(null, finishedSubsystemXml, marshalled, true); compareXml(null, finishedSubsystemXml, marshalled, true);


//Install the persisted xml from the first controller into a second controller //Install the persisted xml from the first controller into a second controller
KernelServices servicesB = super.installInController(additionalInit, marshalled); KernelServices servicesB = createKernelServicesBuilder(additionalInit).setSubsystemXml(marshalled).build();
ModelNode modelB = servicesB.readWholeModel(); ModelNode modelB = servicesB.readWholeModel();


//Make sure the models from the two controllers are identical //Make sure the models from the two controllers are identical
Expand All @@ -262,7 +264,7 @@ public void testParseAndMarshalModel1_1WithShowModel() throws Exception {


AdditionalInitialization additionalInit = new BaseAdditionalInitalization(); AdditionalInitialization additionalInit = new BaseAdditionalInitalization();


KernelServices servicesA = super.installInController(additionalInit, subsystemXml); KernelServices servicesA = createKernelServicesBuilder(additionalInit).setSubsystemXml(subsystemXml).build();
//Get the model and the persisted xml from the first controller //Get the model and the persisted xml from the first controller
ModelNode modelA = servicesA.readWholeModel(); ModelNode modelA = servicesA.readWholeModel();
String marshalled = servicesA.getPersistedSubsystemXml(); String marshalled = servicesA.getPersistedSubsystemXml();
Expand All @@ -272,7 +274,7 @@ public void testParseAndMarshalModel1_1WithShowModel() throws Exception {
compareXml(null, finishedXml, marshalled, true); compareXml(null, finishedXml, marshalled, true);


//Install the persisted xml from the first controller into a second controller //Install the persisted xml from the first controller into a second controller
KernelServices servicesB = super.installInController(additionalInit, marshalled); KernelServices servicesB = createKernelServicesBuilder(additionalInit).setSubsystemXml(marshalled).build();
ModelNode modelB = servicesB.readWholeModel(); ModelNode modelB = servicesB.readWholeModel();


//Make sure the models from the two controllers are identical //Make sure the models from the two controllers are identical
Expand All @@ -291,7 +293,7 @@ public void testParseAndMarshalModelWithRemoteConnectorRef1_1() throws Exception


AdditionalInitialization additionalInit = new BaseAdditionalInitalization(); AdditionalInitialization additionalInit = new BaseAdditionalInitalization();


KernelServices servicesA = super.installInController(additionalInit, subsystemXml); KernelServices servicesA = createKernelServicesBuilder(additionalInit).setSubsystemXml(subsystemXml).build();
//Get the model and the persisted xml from the first controller //Get the model and the persisted xml from the first controller
ModelNode modelA = servicesA.readWholeModel(); ModelNode modelA = servicesA.readWholeModel();
String marshalled = servicesA.getPersistedSubsystemXml(); String marshalled = servicesA.getPersistedSubsystemXml();
Expand All @@ -300,7 +302,7 @@ public void testParseAndMarshalModelWithRemoteConnectorRef1_1() throws Exception
compareXml(null, subsystemXml, marshalled, true); compareXml(null, subsystemXml, marshalled, true);


//Install the persisted xml from the first controller into a second controller //Install the persisted xml from the first controller into a second controller
KernelServices servicesB = super.installInController(additionalInit, marshalled); KernelServices servicesB = createKernelServicesBuilder(additionalInit).setSubsystemXml(marshalled).build();
ModelNode modelB = servicesB.readWholeModel(); ModelNode modelB = servicesB.readWholeModel();


//Make sure the models from the two controllers are identical //Make sure the models from the two controllers are identical
Expand All @@ -324,7 +326,7 @@ public void testParseAndMarshalModel1_1() throws Exception {


AdditionalInitialization additionalInit = new BaseAdditionalInitalization(); AdditionalInitialization additionalInit = new BaseAdditionalInitalization();


KernelServices servicesA = super.installInController(additionalInit, subsystemXml); KernelServices servicesA = createKernelServicesBuilder(additionalInit).setSubsystemXml(subsystemXml).build();
//Get the model and the persisted xml from the first controller //Get the model and the persisted xml from the first controller
ModelNode modelA = servicesA.readWholeModel(); ModelNode modelA = servicesA.readWholeModel();
String marshalled = servicesA.getPersistedSubsystemXml(); String marshalled = servicesA.getPersistedSubsystemXml();
Expand All @@ -334,7 +336,7 @@ public void testParseAndMarshalModel1_1() throws Exception {
compareXml(null, finishedXml, marshalled, true); compareXml(null, finishedXml, marshalled, true);


//Install the persisted xml from the first controller into a second controller //Install the persisted xml from the first controller into a second controller
KernelServices servicesB = super.installInController(additionalInit, marshalled); KernelServices servicesB = createKernelServicesBuilder(additionalInit).setSubsystemXml(marshalled).build();
ModelNode modelB = servicesB.readWholeModel(); ModelNode modelB = servicesB.readWholeModel();


//Make sure the models from the two controllers are identical //Make sure the models from the two controllers are identical
Expand All @@ -352,7 +354,7 @@ public void testParseAndMarshalModel1_2WithShowModels() throws Exception {


AdditionalInitialization additionalInit = new BaseAdditionalInitalization(); AdditionalInitialization additionalInit = new BaseAdditionalInitalization();


KernelServices servicesA = super.installInController(additionalInit, subsystemXml); KernelServices servicesA = createKernelServicesBuilder(additionalInit).setSubsystemXml(subsystemXml).build();
//Get the model and the persisted xml from the first controller //Get the model and the persisted xml from the first controller
ModelNode modelA = servicesA.readWholeModel(); ModelNode modelA = servicesA.readWholeModel();
String marshalled = servicesA.getPersistedSubsystemXml(); String marshalled = servicesA.getPersistedSubsystemXml();
Expand All @@ -362,7 +364,7 @@ public void testParseAndMarshalModel1_2WithShowModels() throws Exception {
compareXml(null, subsystemXml, marshalled, true); compareXml(null, subsystemXml, marshalled, true);


//Install the persisted xml from the first controller into a second controller //Install the persisted xml from the first controller into a second controller
KernelServices servicesB = super.installInController(additionalInit, marshalled); KernelServices servicesB = createKernelServicesBuilder(additionalInit).setSubsystemXml(marshalled).build();
ModelNode modelB = servicesB.readWholeModel(); ModelNode modelB = servicesB.readWholeModel();


//Make sure the models from the two controllers are identical //Make sure the models from the two controllers are identical
Expand All @@ -380,7 +382,7 @@ public void testParseAndMarshalModel1_2WithShowModelsAndOldPropertyFormat() thro


AdditionalInitialization additionalInit = new BaseAdditionalInitalization(); AdditionalInitialization additionalInit = new BaseAdditionalInitalization();


KernelServices servicesA = super.installInController(additionalInit, subsystemXml); KernelServices servicesA = createKernelServicesBuilder(additionalInit).setSubsystemXml(subsystemXml).build();
//Get the model and the persisted xml from the first controller //Get the model and the persisted xml from the first controller
ModelNode modelA = servicesA.readWholeModel(); ModelNode modelA = servicesA.readWholeModel();
Assert.assertTrue(modelA.get(SUBSYSTEM, "jmx", CommonAttributes.EXPOSE_MODEL, CommonAttributes.RESOLVED).hasDefined(CommonAttributes.PROPER_PROPERTY_FORMAT)); Assert.assertTrue(modelA.get(SUBSYSTEM, "jmx", CommonAttributes.EXPOSE_MODEL, CommonAttributes.RESOLVED).hasDefined(CommonAttributes.PROPER_PROPERTY_FORMAT));
Expand All @@ -392,7 +394,7 @@ public void testParseAndMarshalModel1_2WithShowModelsAndOldPropertyFormat() thro
compareXml(null, subsystemXml, marshalled, true); compareXml(null, subsystemXml, marshalled, true);


//Install the persisted xml from the first controller into a second controller //Install the persisted xml from the first controller into a second controller
KernelServices servicesB = super.installInController(additionalInit, marshalled); KernelServices servicesB = createKernelServicesBuilder(additionalInit).setSubsystemXml(marshalled).build();
ModelNode modelB = servicesB.readWholeModel(); ModelNode modelB = servicesB.readWholeModel();


//Make sure the models from the two controllers are identical //Make sure the models from the two controllers are identical
Expand All @@ -408,7 +410,7 @@ public void testDescribeHandler() throws Exception {
" <expose-expression-model domain-name=\"jboss.EXPRESSION\"/>" + " <expose-expression-model domain-name=\"jboss.EXPRESSION\"/>" +
" <remoting-connector />" + " <remoting-connector />" +
"</subsystem>"; "</subsystem>";
KernelServices servicesA = super.installInController(subsystemXml); KernelServices servicesA = createKernelServicesBuilder(null).setSubsystemXml(subsystemXml).build();
//Get the model and the describe operations from the first controller //Get the model and the describe operations from the first controller
ModelNode modelA = servicesA.readWholeModel(); ModelNode modelA = servicesA.readWholeModel();
ModelNode describeOp = new ModelNode(); ModelNode describeOp = new ModelNode();
Expand All @@ -423,7 +425,7 @@ public void testDescribeHandler() throws Exception {




//Install the describe options from the first controller into a second controller //Install the describe options from the first controller into a second controller
KernelServices servicesB = super.installInController(operations); KernelServices servicesB = createKernelServicesBuilder(null).setBootOperations(operations).build();
ModelNode modelB = servicesB.readWholeModel(); ModelNode modelB = servicesB.readWholeModel();


//Make sure the models from the two controllers are identical //Make sure the models from the two controllers are identical
Expand All @@ -435,7 +437,7 @@ public void testShowModelAlias() throws Exception {
String subsystemXml = String subsystemXml =
"<subsystem xmlns=\"" + Namespace.CURRENT.getUriString() + "\"/>"; "<subsystem xmlns=\"" + Namespace.CURRENT.getUriString() + "\"/>";


KernelServices services = super.installInController(subsystemXml); KernelServices services = createKernelServicesBuilder(null).setSubsystemXml(subsystemXml).build();


ModelNode model = services.readWholeModel(); ModelNode model = services.readWholeModel();
Assert.assertFalse(model.get(SUBSYSTEM, JMXExtension.SUBSYSTEM_NAME, CommonAttributes.EXPOSE_MODEL, CommonAttributes.RESOLVED).isDefined()); Assert.assertFalse(model.get(SUBSYSTEM, JMXExtension.SUBSYSTEM_NAME, CommonAttributes.EXPOSE_MODEL, CommonAttributes.RESOLVED).isDefined());
Expand Down Expand Up @@ -523,15 +525,15 @@ public void testTransformation_1_0_0() throws Exception {
checkOutcome(mainServices.executeOperation(op)); checkOutcome(mainServices.executeOperation(op));
checkOutcome(mainServices.executeOperation(oldVersion, transformedOp)); checkOutcome(mainServices.executeOperation(oldVersion, transformedOp));
legacyModel = checkSubsystemModelTransformation(mainServices, oldVersion); legacyModel = checkSubsystemModelTransformation(mainServices, oldVersion);
check_1_0_0_Model(legacyModel.get(SUBSYSTEM, mainSubsystemName), true, false); check_1_0_0_Model(legacyModel.get(SUBSYSTEM, getMainSubsystemName()), true, false);




op = createOperation(ADD, CommonAttributes.EXPOSE_MODEL, CommonAttributes.RESOLVED); op = createOperation(ADD, CommonAttributes.EXPOSE_MODEL, CommonAttributes.RESOLVED);
transformedOp = mainServices.transformOperation(oldVersion, op); transformedOp = mainServices.transformOperation(oldVersion, op);
checkOutcome(mainServices.executeOperation(op)); checkOutcome(mainServices.executeOperation(op));
checkOutcome(mainServices.executeOperation(oldVersion, transformedOp)); checkOutcome(mainServices.executeOperation(oldVersion, transformedOp));
legacyModel = checkSubsystemModelTransformation(mainServices, oldVersion); legacyModel = checkSubsystemModelTransformation(mainServices, oldVersion);
check_1_0_0_Model(legacyModel.get(SUBSYSTEM, mainSubsystemName), true, true); check_1_0_0_Model(legacyModel.get(SUBSYSTEM, getMainSubsystemName()), true, true);


} }


Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -50,14 +50,12 @@ public SubsystemDescriptionsUnitTestCase() {
public void testSubsystemDescriptions() throws Exception { public void testSubsystemDescriptions() throws Exception {


List<ModelNode> empty = Collections.emptyList(); List<ModelNode> empty = Collections.emptyList();
KernelServices servicesA = super.installInController(empty); KernelServices servicesA = createKernelServicesBuilder(null).setBootOperations(empty).build();


final ModelNode operation = createReadResourceDescriptionOperation(); final ModelNode operation = createReadResourceDescriptionOperation();
final ModelNode result = servicesA.executeOperation(operation); final ModelNode result = servicesA.executeOperation(operation);


Assert.assertEquals(ModelDescriptionConstants.SUCCESS, result.get(ModelDescriptionConstants.OUTCOME).asString()); Assert.assertEquals(ModelDescriptionConstants.SUCCESS, result.get(ModelDescriptionConstants.OUTCOME).asString());
final ModelNode description = result.get("result");

servicesA.shutdown(); servicesA.shutdown();
} }


Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -255,16 +255,16 @@ public void testTransformers1_0_0() throws Exception {


checkSubsystemModelTransformation(mainServices, modelVersion); checkSubsystemModelTransformation(mainServices, modelVersion);
//Check that start level was removed //Check that start level was removed
ModelNode currentModule1 = current.get(ModelDescriptionConstants.SUBSYSTEM, mainSubsystemName, ModelConstants.CAPABILITY, "org.acme.module1"); ModelNode currentModule1 = current.get(ModelDescriptionConstants.SUBSYSTEM, getMainSubsystemName(), ModelConstants.CAPABILITY, "org.acme.module1");
Assert.assertTrue(currentModule1.isDefined()); Assert.assertTrue(currentModule1.isDefined());
Assert.assertTrue(currentModule1.has(ModelConstants.STARTLEVEL)); Assert.assertTrue(currentModule1.has(ModelConstants.STARTLEVEL));
Assert.assertFalse(currentModule1.hasDefined(ModelConstants.STARTLEVEL)); Assert.assertFalse(currentModule1.hasDefined(ModelConstants.STARTLEVEL));


ModelNode legacyModule1 = legacy.get(ModelDescriptionConstants.SUBSYSTEM, mainSubsystemName, ModelConstants.CAPABILITY, "org.acme.module1"); ModelNode legacyModule1 = legacy.get(ModelDescriptionConstants.SUBSYSTEM, getMainSubsystemName(), ModelConstants.CAPABILITY, "org.acme.module1");
Assert.assertTrue(legacyModule1.isDefined()); Assert.assertTrue(legacyModule1.isDefined());
Assert.assertFalse(legacyModule1.has(ModelConstants.STARTLEVEL)); Assert.assertFalse(legacyModule1.has(ModelConstants.STARTLEVEL));


ModelNode transformedModule1 = mainServices.readTransformedModel(modelVersion).get(SUBSYSTEM, mainSubsystemName, ModelConstants.CAPABILITY, "org.acme.module1"); ModelNode transformedModule1 = mainServices.readTransformedModel(modelVersion).get(SUBSYSTEM, getMainSubsystemName(), ModelConstants.CAPABILITY, "org.acme.module1");
Assert.assertTrue(transformedModule1.isDefined()); Assert.assertTrue(transformedModule1.isDefined());
Assert.assertFalse(legacyModule1.has(ModelConstants.STARTLEVEL)); Assert.assertFalse(legacyModule1.has(ModelConstants.STARTLEVEL));
} }
Expand Down
Loading

0 comments on commit a64e95c

Please sign in to comment.