use of org.jboss.as.cli.operation.ParsedCommandLine in project wildfly-core by wildfly.
the class PropertyReplacementTestCase method testOperationName.
@Test
public void testOperationName() throws Exception {
final ParsedCommandLine parsed = parse(":${" + OP_PROP_NAME + "}");
assertEquals(OP_PROP_VALUE, parsed.getOperationName());
}
use of org.jboss.as.cli.operation.ParsedCommandLine in project wildfly-core by wildfly.
the class PropertyReplacementTestCase method testNodeName.
@Test
public void testNodeName() throws Exception {
final ParsedCommandLine parsed = parse("/test=${" + NODE_NAME_PROP_NAME + "}:op");
final OperationRequestAddress address = parsed.getAddress();
assertNotNull(address);
assertEquals("test", address.getNodeType());
assertEquals(NODE_NAME_PROP_VALUE, address.getNodeName());
}
use of org.jboss.as.cli.operation.ParsedCommandLine in project wildfly-core by wildfly.
the class PropertyReplacementTestCase method testNodeNameWithEmptyProperty.
@Test
public void testNodeNameWithEmptyProperty() throws Exception {
final ParsedCommandLine parsed = parse("/test=" + PREFIX + "${" + EMPTY_PROP_NAME + "}${" + NODE_NAME_PROP_NAME + "}:op");
final OperationRequestAddress address = parsed.getAddress();
assertNotNull(address);
assertEquals("test", address.getNodeType());
assertEquals(PREFIX + NODE_NAME_PROP_VALUE, address.getNodeName());
}
use of org.jboss.as.cli.operation.ParsedCommandLine in project wildfly-core by wildfly.
the class PropertyReplacementTestCase method testParameterValueInParenthesis.
@Test
public void testParameterValueInParenthesis() throws Exception {
final ParsedCommandLine parsed = parse(":op(name=(${" + OP_PROP_PROP_NAME + "}))");
assertEquals("op", parsed.getOperationName());
assertEquals("(${" + OP_PROP_PROP_NAME + "})", parsed.getPropertyValue("name"));
}
use of org.jboss.as.cli.operation.ParsedCommandLine in project wildfly-core by wildfly.
the class PropertyReplacementTestCase method testNodeTypeWithEmptyProperty.
@Test
public void testNodeTypeWithEmptyProperty() throws Exception {
final ParsedCommandLine parsed = parse("/" + PREFIX + "${" + EMPTY_PROP_NAME + "}${" + NODE_TYPE_PROP_NAME + "}=test:op");
final OperationRequestAddress address = parsed.getAddress();
assertNotNull(address);
assertEquals(PREFIX + NODE_TYPE_PROP_VALUE, address.getNodeType());
assertEquals("test", address.getNodeName());
}
Aggregations