Package org.rhq.modules.plugins.jbossas7.json

Examples of org.rhq.modules.plugins.jbossas7.json.CompositeOperation.step()


        assert additionalProperties.get("value") instanceof Map;
        Map<String, Object> map = (Map<String, Object>) additionalProperties.get("value");
        assert map.containsKey("EXPRESSION_VALUE");
        assert map.get("EXPRESSION_VALUE").equals("${foo:42}");

        additionalProperties = cop.step(2).getAdditionalProperties();
        assert additionalProperties.get("name").equals("bar");
        assert additionalProperties.get("value").equals(456);

    }
View Full Code Here


        CompositeOperation cop = delegate.updateGenerateOperationFromProperties(conf, new Address());

        assert cop != null;
        assert cop.numberOfSteps() == 1;
        Operation step = cop.step(0);
        assert step != null;
        assert step.getOperation().equals("write-attribute") : "Step name was " + step.getOperation();
        Map<String, Object> additionalProperties = step.getAdditionalProperties();
        assert additionalProperties != null;
        assert additionalProperties.size() == 2;
View Full Code Here

        CompositeOperation cop = delegate.updateGenerateOperationFromProperties(conf, new Address());

        assert cop != null;
        assert cop.numberOfSteps() == 1;
        Operation step = cop.step(0);
        assert step != null;
        assert step.getOperation().equals("write-attribute") : "Step name was " + step.getOperation();
        Map<String, Object> additionalProperties = step.getAdditionalProperties();
        assert additionalProperties != null;
        assert additionalProperties.size() == 2;
View Full Code Here

        CompositeOperation cop = delegate.updateGenerateOperationFromProperties(conf, new Address());

        Assert.assertNotNull(cop);
        Assert.assertEquals(cop.numberOfSteps(), 1);
        Assert.assertEquals(cop.step(0).getOperation(), "write-attribute", "Step name was "
            + cop.step(0).getOperation());

        Map<String, Object> additionalProperties = cop.step(0).getAdditionalProperties();
        Assert.assertEquals(additionalProperties.size(), 2);
        Assert.assertEquals(additionalProperties.get("name"), "properties");
View Full Code Here

        CompositeOperation cop = delegate.updateGenerateOperationFromProperties(conf, new Address());

        Assert.assertNotNull(cop);
        Assert.assertEquals(cop.numberOfSteps(), 1);
        Assert.assertEquals(cop.step(0).getOperation(), "write-attribute", "Step name was "
            + cop.step(0).getOperation());

        Map<String, Object> additionalProperties = cop.step(0).getAdditionalProperties();
        Assert.assertEquals(additionalProperties.size(), 2);
        Assert.assertEquals(additionalProperties.get("name"), "properties");
View Full Code Here

        Assert.assertNotNull(cop);
        Assert.assertEquals(cop.numberOfSteps(), 1);
        Assert.assertEquals(cop.step(0).getOperation(), "write-attribute", "Step name was "
            + cop.step(0).getOperation());

        Map<String, Object> additionalProperties = cop.step(0).getAdditionalProperties();
        Assert.assertEquals(additionalProperties.size(), 2);
        Assert.assertEquals(additionalProperties.get("name"), "properties");

        @SuppressWarnings("unchecked")
        List<Map<String, Object>> value = (List<Map<String, Object>>) additionalProperties.get("value");
View Full Code Here

        Assert.assertNotNull(cop);
        Assert.assertEquals(cop.numberOfSteps(), 6);

        for (int index = 0; index < 6; index++) {
            Operation step = cop.step(index);
            Assert.assertEquals(step.getOperation(), "write-attribute", "Step name was " + step.getOperation());
            Map<String, Object> additionalProperties = step.getAdditionalProperties();
            Assert.assertEquals(additionalProperties.size(), 2);

            if (additionalProperties.get("name").equals("firstprop")) {
View Full Code Here

        assert cop.numberOfSteps() == properties.size() : "Composite operation steps incorrect. Expected '"
            + properties.size() + "' but was '" + cop.numberOfSteps() + "'.";
        //check property values
        for (int i = 0; i < cop.numberOfSteps(); i++) {
            //each property maps to a separate operation.
            Operation step = cop.step(i);
            assert step.getOperation().equals("write-attribute") : "Write attribute not set correctly.";
            Map<String, Object> props = step.getAdditionalProperties();
            assert props.size() == 2 : "Property list not correct. Expected '2' property but there were '"
                + props.size() + "'.";
            //check that property was returned
View Full Code Here

        conf.put(ps);

        CompositeOperation cop = delegate.updateGenerateOperationFromProperties(conf, new Address());

        assert cop.numberOfSteps() == 1;
        Operation step1 = cop.step(0);
        assert step1.getOperation().equals("write-attribute");
        Map<String, Object> props = step1.getAdditionalProperties();
        assert props.size() == 2;
        assert props.get("name").equals("mode");
        assert props.get("value").equals("SYNC"); // the defaultValue
View Full Code Here

        conf.put(ps);

        CompositeOperation cop = delegate.updateGenerateOperationFromProperties(conf, new Address());

        assert cop.numberOfSteps() == 1;
        Operation step1 = cop.step(0);
        assert step1.getOperation().equals("write-attribute");
        Map<String, Object> props = step1.getAdditionalProperties();
        assert props.size() == 2;
        assert props.get("name").equals("mode");
        assert props.get("value").equals("ASYNC"); // the user provided value
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.