Пример #1
0
 public void assertEnd(Class expectedClass, int expectedIndex) {
   Event.Stop event = (Event.Stop) parser.next();
   assertEquals(expectedClass, event.getClass());
   assertEquals(expectedIndex, event.getIndex());
 }
Пример #2
0
 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());
 }
Пример #3
0
 public void assertMethod(String name) {
   Event.Subordinate event = (Event.Subordinate) parser.next();
   assertEquals(name, event.getDescriptor().getName());
 }
Пример #4
0
 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());
 }
Пример #5
0
 public void assertSeparator() {
   Event event = parser.next();
   assertTrue("was expecting a separator instead of " + event, event instanceof Event.Separator);
 }