use of org.jboss.as.cli.operation.ParsedCommandLine in project wildfly-core by wildfly.
the class PropertyReplacementTestCase method testDMRParameterValue.
@Test
public void testDMRParameterValue() throws Exception {
final ParsedCommandLine parsed = parse(":op(name = {\"attr\" => \"${" + OP_PROP_PROP_NAME + "}\"})");
assertEquals("op", parsed.getOperationName());
assertEquals("{\"attr\" => \"${" + 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 testNestedReplacement.
@Test
public void testNestedReplacement() throws Exception {
final ParsedCommandLine parsed = parse("${${" + PROP_PART1_NAME + "}.${" + PROP_PART2_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 testQuotedParameterValue.
@Test
public void testQuotedParameterValue() 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 testComplexParameterValue.
@Test
public void testComplexParameterValue() throws Exception {
final ParsedCommandLine parsed = parse(":op(name={attr=${" + OP_PROP_PROP_NAME + "}})");
assertEquals("op", parsed.getOperationName());
assertEquals("{attr=${" + 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 testCommandArgumentName.
@Test
public void testCommandArgumentName() throws Exception {
final ParsedCommandLine parsed = parse("command-name --${" + OP_PROP_PROP_NAME + "}=test");
assertEquals("command-name", parsed.getOperationName());
assertEquals(parsed.getPropertyValue("--" + OP_PROP_PROP_VALUE), "test");
}
Aggregations