use of org.jboss.as.cli.operation.ParsedOperationRequestHeader in project wildfly-core by wildfly.
the class RolloutPlanParsingTestCase method testEndsOnGroupPropertyName.
@Test
public void testEndsOnGroupPropertyName() throws Exception {
parse(":do{ rollout groupA( prop");
assertFalse(handler.hasAddress());
assertTrue(handler.hasOperationName());
assertFalse(handler.hasProperties());
assertFalse(handler.endsOnAddressOperationNameSeparator());
assertFalse(handler.endsOnPropertyListStart());
assertFalse(handler.endsOnPropertySeparator());
assertFalse(handler.endsOnPropertyValueSeparator());
assertFalse(handler.endsOnNodeSeparator());
assertFalse(handler.endsOnNodeTypeNameSeparator());
assertFalse(handler.endsOnSeparator());
assertFalse(handler.endsOnHeaderListStart());
assertFalse(handler.isRequestComplete());
assertTrue(handler.hasHeaders());
final Collection<ParsedOperationRequestHeader> headers = handler.getHeaders();
assertEquals(1, headers.size());
final ParsedOperationRequestHeader header = headers.iterator().next();
assertTrue(header instanceof ParsedRolloutPlanHeader);
ParsedRolloutPlanHeader rollout = (ParsedRolloutPlanHeader) header;
final SingleRolloutPlanGroup group = rollout.getLastGroup();
assertNotNull(group);
assertEquals("groupA", group.getGroupName());
assertFalse(group.endsOnPropertyListStart());
assertFalse(group.endsOnPropertyListEnd());
assertTrue(group.hasProperties());
assertFalse(group.endsOnPropertyValueSeparator());
assertEquals("prop", group.getLastPropertyName());
assertNull(group.getLastPropertyValue());
assertEquals(21, group.getLastChunkIndex());
}
use of org.jboss.as.cli.operation.ParsedOperationRequestHeader in project wildfly-core by wildfly.
the class RolloutPlanParsingTestCase method testEndsOnPlanRef.
@Test
public void testEndsOnPlanRef() throws Exception {
parse(":do{ rollout id=");
assertFalse(handler.hasAddress());
assertTrue(handler.hasOperationName());
assertFalse(handler.hasProperties());
assertFalse(handler.endsOnAddressOperationNameSeparator());
assertFalse(handler.endsOnPropertyListStart());
assertFalse(handler.endsOnPropertySeparator());
assertFalse(handler.endsOnPropertyValueSeparator());
assertFalse(handler.endsOnNodeSeparator());
assertFalse(handler.endsOnNodeTypeNameSeparator());
assertFalse(handler.endsOnSeparator());
assertFalse(handler.endsOnHeaderListStart());
assertFalse(handler.isRequestComplete());
assertTrue(handler.hasHeaders());
final Collection<ParsedOperationRequestHeader> headers = handler.getHeaders();
assertEquals(1, headers.size());
final ParsedOperationRequestHeader header = headers.iterator().next();
assertTrue(header instanceof ParsedRolloutPlanHeader);
final ParsedRolloutPlanHeader rollout = (ParsedRolloutPlanHeader) header;
assertNull(rollout.getPlanRef());
assertFalse(rollout.hasProperties());
assertNull(rollout.getLastGroup());
assertTrue(rollout.endsOnPlanIdValueSeparator());
assertEquals(15, rollout.getLastSeparatorIndex());
}
Aggregations