@Test
 public void testCreateGenerator_int() {
   LiteralSequence sequence = new LiteralSequence("2, 3, 5, 7, 11");
   Generator<Integer> generator = sequence.createNumberGenerator(Integer.class, 1, 20, 1, false);
   generator.init(context);
   expectGeneratedSequence(generator, 2, 3, 5, 7, 11);
 }
 @Test
 public void testApply() {
   Generator<String> source = new SequenceTestGenerator<String>("A", "B", "C", "D");
   LiteralSequence sequence = new LiteralSequence("1, 3");
   Generator<String> generator = sequence.applyTo(source, false);
   generator.init(context);
   expectGeneratedSequence(generator, "B", "D");
 }
Beispiel #3
0
 public String toString() {
   return lhs.toString() + " -> " + rhs.toString();
 }