public void assertEnd(Class expectedClass, int expectedIndex) { Event.Stop event = (Event.Stop) parser.next(); assertEquals(expectedClass, event.getClass()); assertEquals(expectedIndex, event.getIndex()); }
public void assertArgument(String name, String... values) { Event.Argument event = (Event.Argument) parser.next(); assertEquals(name, event.getParameter().getName()); assertEquals(Arrays.asList(values), event.getStrings()); }
public void assertMethod(String name) { Event.Subordinate event = (Event.Subordinate) parser.next(); assertEquals(name, event.getDescriptor().getName()); }
public void assertOption(String name, String... values) { Event.Option event = (Event.Option) parser.next(); assertTrue(event.getParameter().getNames().contains(name)); assertEquals(Arrays.asList(values), event.getStrings()); }
public void assertSeparator() { Event event = parser.next(); assertTrue("was expecting a separator instead of " + event, event instanceof Event.Separator); }