@Test public void fails_to_print_when_given_an_unknown_query_type() { thrown.expect(IllegalArgumentException.class); thrown.expectMessage("Unsupported query type <org.liquigraph.core.io.ConditionPrinterTest$1>"); Precondition precondition = new Precondition(); precondition.setQuery(new Query() { }); conditionPrinter.print(precondition); }
public Collection<String> print(Precondition precondition) { if (precondition == null) { return new ArrayList<>(); } Collection<String> lines = new ArrayList<>(); lines.add(format(" lines.addAll(print((Condition) precondition)); return lines; }
ConditionPrinter { public Collection<String> print(Precondition precondition) { if (precondition == null) { return new ArrayList<>(); } Collection<String> lines = new ArrayList<>(); lines.add(format(" lines.addAll(print((Condition) precondition)); return lines; } }
ConditionPrinter { public Collection<String> print(Precondition precondition) { if (precondition == null) { return new ArrayList<>(); } Collection<String> lines = new ArrayList<>(); lines.add(format(" lines.addAll(print((Condition) precondition)); return lines; }  }
ConditionPrinter { public Collection<String> print(Precondition precondition) { if (precondition == null) { return new ArrayList<>(); } Collection<String> lines = new ArrayList<>(); lines.add(format(" lines.addAll(print((Condition) precondition)); return lines; }  Collection<String> print(Precondition precondition); Collection<String> print(Condition precondition); }
ConditionPrinter { public Collection<String> print(Precondition precondition) { if (precondition == null) { return new ArrayList<>(); } Collection<String> lines = new ArrayList<>(); lines.add(format(" lines.addAll(print((Condition) precondition)); return lines; }  Collection<String> print(Precondition precondition); Collection<String> print(Condition precondition);  }