Java Code Examples for org.jboss.dmr.ModelNode#TRUE
The following examples show how to use
org.jboss.dmr.ModelNode#TRUE .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractSystemPropertyTransformersTest.java From wildfly-core with GNU Lesser General Public License v2.1 | 5 votes |
private ModelNode getExpectedUndefined(ModelVersion modelVersion){ if (modelVersion_1_4_0_OrGreater()) { return new ModelNode(); } else { return ModelNode.TRUE; } }
Example 2
Source File: AbstractJvmModelTest.java From wildfly-core with GNU Lesser General Public License v2.1 | 4 votes |
@Test public void testWriteEnvClasspathIgnored() throws Exception { KernelServices kernelServices = doEmptyJvmAdd(); ModelNode value = ModelNode.TRUE; Assert.assertEquals(value, writeTest(kernelServices, "env-classpath-ignored", value)); }
Example 3
Source File: AbstractJvmModelTest.java From wildfly-core with GNU Lesser General Public License v2.1 | 4 votes |
@Test public void testFullAdd() throws Exception { ModelNode typeValue = new ModelNode("IBM"); ModelNode agentLibValue = new ModelNode("agentLib"); ModelNode envClasspathIgnored = ModelNode.TRUE; ModelNode javaAgentValue = new ModelNode("javaAgent"); ModelNode javaHomeValue = new ModelNode("javaHome"); ModelNode stackSizeValue = new ModelNode("stackSize"); ModelNode heapSizeValue = new ModelNode("heapSize"); ModelNode maxHeapSizeValue = new ModelNode("maxHeapSize"); ModelNode permgenSizeValue = new ModelNode("permGenSize"); ModelNode maxPermSizeValue = new ModelNode("maxPermSize"); ModelNode jvmOptionsValue = new ModelNode().add("-Xmx100m").add("-Xms30m"); ModelNode environmentVariablesValue = new ModelNode(); environmentVariablesValue.get("ENV1").set("one"); environmentVariablesValue.get("ENV2").set("two"); ModelNode debugEnabledValue = ModelNode.TRUE; ModelNode debugOptionsValue = new ModelNode("debugOptions"); ModelNode op = createOperation(ADD); op.get("type").set(typeValue); op.get("agent-lib").set(agentLibValue); op.get("env-classpath-ignored").set(envClasspathIgnored); op.get("java-agent").set(javaAgentValue); op.get("java-home").set(javaHomeValue); op.get("stack-size").set(stackSizeValue); op.get("heap-size").set(heapSizeValue); op.get("max-heap-size").set(maxHeapSizeValue); op.get("permgen-size").set(permgenSizeValue); op.get("max-permgen-size").set(maxPermSizeValue); op.get("jvm-options").set(jvmOptionsValue); op.get("environment-variables").set(environmentVariablesValue); if (server) { op.get("debug-enabled").set(debugEnabledValue); op.get("debug-options").set(debugOptionsValue); } KernelServices kernelServices = createKernelServicesBuilder(type) .setBootOperations(Collections.singletonList(op)) .setModelInitializer(getModelInitializer(), null) .build(); Assert.assertTrue(kernelServices.isSuccessfulBoot()); ModelNode resource = getJvmResource(kernelServices); Assert.assertEquals(typeValue, resource.get("type")); Assert.assertEquals(agentLibValue, resource.get("agent-lib")); Assert.assertEquals(envClasspathIgnored, resource.get("env-classpath-ignored")); Assert.assertEquals(javaAgentValue, resource.get("java-agent")); Assert.assertEquals(javaHomeValue, resource.get("java-home")); Assert.assertEquals(stackSizeValue, resource.get("stack-size")); Assert.assertEquals(heapSizeValue, resource.get("heap-size")); Assert.assertEquals(maxHeapSizeValue, resource.get("max-heap-size")); Assert.assertEquals(permgenSizeValue, resource.get("permgen-size")); Assert.assertEquals(maxPermSizeValue, resource.get("max-permgen-size")); Assert.assertEquals(jvmOptionsValue, resource.get("jvm-options")); Assert.assertEquals(environmentVariablesValue, resource.get("environment-variables")); if (server) { Assert.assertEquals(debugEnabledValue, resource.get("debug-enabled")); Assert.assertEquals(debugOptionsValue, resource.get("debug-options")); } }
Example 4
Source File: HostServerJvmModelTestCase.java From wildfly-core with GNU Lesser General Public License v2.1 | 4 votes |
@Test public void testWriteDebugEnabled() throws Exception { KernelServices kernelServices = doEmptyJvmAdd(); ModelNode value = ModelNode.TRUE; Assert.assertEquals(value, writeTest(kernelServices, "debug-enabled", value)); }