Package org.jboss.as.subsystem.test

Examples of org.jboss.as.subsystem.test.KernelServices.executeForResult()


        }
        service.executeOperation(writeOp);
        ModelNode readOp = Util.createOperation("read-attribute", address);
        readOp.get("name").set("login-modules");
        ModelNode result = service.executeForResult(readOp);
        List<ModelNode> modules = result.asList();
        Assert.assertEquals("There should be exactly 6 modules but there are not", 6, modules.size());
        for (int i = 1; i <= 6; i++) {
            ModelNode module = modules.get(i - 1);
            Assert.assertEquals(module.get("code").asString(), "module-" + i);
View Full Code Here


            final ModelNode remove = Util.createRemoveOperation(parentAddress.append(PathElement.pathElement(resourceType, childName)));
            ModelTestUtils.checkOutcome(mainServices.executeOperation(remove));
            ModelTestUtils.checkOutcome(mainServices.executeOperation(modelVersion, mainServices.transformOperation(modelVersion, remove)));
            if (--i > 0) {
                //There are still xxx-module so we work fine
                legacyServices.executeForResult(Util.createOperation(ReadResourceHandler.DEFINITION, parentAddress));
                attributes = getLegacyAttribute(legacyServices, parentAddress, attributeName);
                Assert.assertEquals(i, attributes.size());
            } else {
                //Here the read-resource should fail since the resource no longer exists, removal of
                //the last xxx-module resource becomes a remove of the parent
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.