Examples of asBoolean()


Examples of org.jboss.dmr.ModelNode.asBoolean()

        addr.add("socket-binding-group", "standard-sockets");
        addr.add("socket-binding", "http");
        final ModelNode result = executeOperation(op);
        assertTrue(result.hasDefined(VALID));
        final ModelNode value = result.get(VALID);
        assertTrue(value.asBoolean());
        assertFalse(result.hasDefined(PROBLEM));
    }

    @Test
    public void testInvalidPath() throws IOException, MgmtOperationException {
View Full Code Here

Examples of org.jboss.dmr.ModelNode.asBoolean()

        addr.add("socket-binding-group", "standard-sockets");
        addr.add("wrong", "illegal");
        final ModelNode result = executeOperation(op);
        assertTrue(result.hasDefined(VALID));
        final ModelNode value = result.get(VALID);
        assertFalse(value.asBoolean());
        assertTrue(result.hasDefined(PROBLEM));
        final ModelNode problem = result.get(PROBLEM);
        assertTrue(problem.asString().contains("JBAS014808: Child resource '\"wrong\" => \"illegal\"' not found"));
    }
}
View Full Code Here

Examples of org.jboss.dmr.ModelNode.asBoolean()

        HttpMgmtProxy httpMgmt = new HttpMgmtProxy(mgmtURL);

        ModelNode node = httpMgmt.sendGetCommand("/subsystem/web?operation=attribute&name=native");

        // check that a boolean is returned
        assertTrue(node.asBoolean() || (! node.asBoolean()));

    }


    @Test
View Full Code Here

Examples of org.jboss.dmr.ModelNode.asBoolean()

        HttpMgmtProxy httpMgmt = new HttpMgmtProxy(mgmtURL);

        ModelNode node = httpMgmt.sendGetCommand("/subsystem/web?operation=attribute&name=native");

        // check that a boolean is returned
        assertTrue(node.asBoolean() || (! node.asBoolean()));

    }


    @Test
View Full Code Here

Examples of org.jboss.dmr.ModelNode.asBoolean()

        ModelNode ret = httpMgmt.sendPostCommand(op);
        assertTrue("success".equals(ret.get("outcome").asString()));

        ModelNode result = ret.get("result");
        // check that a boolean is returned
        assertTrue(result.asBoolean() || (! result.asBoolean()));

    }


    @Test
View Full Code Here

Examples of org.jboss.dmr.ModelNode.asBoolean()

        ModelNode ret = httpMgmt.sendPostCommand(op);
        assertTrue("success".equals(ret.get("outcome").asString()));

        ModelNode result = ret.get("result");
        // check that a boolean is returned
        assertTrue(result.asBoolean() || (! result.asBoolean()));

    }


    @Test
View Full Code Here

Examples of org.jboss.dmr.ModelNode.asBoolean()

        final ModelNode readAttr = getQueueOperation("read-attribute");
        readAttr.get("name").set("paused");

        ModelNode result = execute(readAttr, true);
        Assert.assertTrue(result.isDefined());
        Assert.assertFalse(result.asBoolean());

        result = execute(getQueueOperation("pause"), true);
        Assert.assertFalse(result.isDefined());

        result = execute(readAttr, true);
View Full Code Here

Examples of org.jboss.dmr.ModelNode.asBoolean()

        result = execute(getQueueOperation("pause"), true);
        Assert.assertFalse(result.isDefined());

        result = execute(readAttr, true);
        Assert.assertTrue(result.isDefined());
        Assert.assertTrue(result.asBoolean());

        result = execute(getQueueOperation("resume"), true);
        Assert.assertFalse(result.isDefined());

        result = execute(readAttr, true);
View Full Code Here

Examples of org.jboss.dmr.ModelNode.asBoolean()

        result = execute(getQueueOperation("resume"), true);
        Assert.assertFalse(result.isDefined());

        result = execute(readAttr, true);
        Assert.assertTrue(result.isDefined());
        Assert.assertFalse(result.asBoolean());
    }

//    @org.junit.Ignore("AS7-2480")
    @Test
    public void testMessageRemoval() throws Exception {
View Full Code Here

Examples of org.jboss.dmr.ModelNode.asBoolean()

        final ModelNode op = getQueueOperation("remove-message");
        op.get("message-id").set(msgA.getJMSMessageID());

        ModelNode result = execute(op, true);
        Assert.assertTrue(result.isDefined());
        Assert.assertTrue(result.asBoolean());

        result = execute(getQueueOperation("count-messages"), true);
        Assert.assertTrue(result.isDefined());
        Assert.assertEquals(2, result.asInt());
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.