Examples of executeForFailure()


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

        for (ModelNode addOp : list) {
            PathAddress addr = PathAddress.pathAddress(addOp.require(ModelDescriptionConstants.OP_ADDR));
            if (addr.size() == 2 && addr.getLastElement().getKey().equals(NamingSubsystemModel.BINDING) && BindingType.forName(addOp.get(NamingBindingResourceDefinition.BINDING_TYPE.getName()).asString()) != BindingType.EXTERNAL_CONTEXT) {
                //Add the cache attribute and make sure it fails
                addOp.get(NamingBindingResourceDefinition.CACHE.getName()).set(true);
                services.executeForFailure(addOp);

                //Remove the cache attribute and make sure it succeeds
                addOp.remove(NamingBindingResourceDefinition.CACHE.getName());
                ModelTestUtils.checkOutcome(services.executeOperation(addOp));
View Full Code Here

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

        ModelNode operation = Util.createAddOperation(address);

        operation.get(ModelElement.IDENTITY_PROVIDER_TRUST_DOMAIN_CERT_ALIAS.getName()).set("servercert");

        mainServices.executeForFailure(operation);
    }

    @Test
    public void failWriteTrustDomainWithCertAlias() throws Exception {
        KernelServices mainServices = createKernelServicesBuilder(new AdditionalInitialization() {
View Full Code Here

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

            .append(ModelElement.IDENTITY_PROVIDER_TRUST_DOMAIN.getName(), "invalid-trust-domain");

        ModelNode operation = Util.getWriteAttributeOperation(address, ModelElement.IDENTITY_PROVIDER_TRUST_DOMAIN_CERT_ALIAS
            .getName(), new ModelNode("servercert"));

        mainServices.executeForFailure(operation);
    }

    @Override
    protected String normalizeXML(String xml) throws Exception {
        return super.normalizeXML(xml).replace(Namespace.PICKETLINK_FEDERATION_1_0.getUri(), Namespace.PICKETLINK_FEDERATION_2_0.getUri());
View Full Code Here

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

                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
                legacyServices.executeForFailure(Util.createOperation(ReadResourceHandler.DEFINITION, parentAddress));
                //Remove the main resource
                ModelTestUtils.checkOutcome(mainServices.executeOperation(Util.createRemoveOperation(parentAddress)));

            }
        }
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.