@Test public void testApplyTo_all_traceElement() { FwFromHostProtocol from = new FwFromHostProtocol(HostProtocol.ALL); List<ExprAclLine> lines = new ArrayList<>(); from.applyTo(lines, null); List<HostProtocol> unhandledProtocols = ImmutableList.of(HostProtocol.ALL, HostProtocol.OSPF3, HostProtocol.RIPNG); List<TraceElement> expectedTraceElements = Stream.of(HostProtocol.values()) .filter(hp -> !unhandledProtocols.contains(hp)) .map( hp -> TraceElement.of( String.format("Matched host-inbound-traffic protocol %s", hp.toString()))) .collect(ImmutableList.toImmutableList()); assertThat( lines.stream().map(ExprAclLine::getTraceElement).collect(ImmutableList.toImmutableList()), equalTo(expectedTraceElements)); }
public void applyTo(List<? super ExprAclLine> lines, Warnings w) { lines.addAll(_protocol.getLines()); }
FwFromHostProtocol implements Serializable { public void applyTo(List<? super ExprAclLine> lines, Warnings w) { lines.addAll(_protocol.getLines()); } }
FwFromHostProtocol implements Serializable { public void applyTo(List<? super ExprAclLine> lines, Warnings w) { lines.addAll(_protocol.getLines()); } FwFromHostProtocol(HostProtocol protocol); }
FwFromHostProtocol implements Serializable { public void applyTo(List<? super ExprAclLine> lines, Warnings w) { lines.addAll(_protocol.getLines()); } FwFromHostProtocol(HostProtocol protocol); void applyTo(List<? super ExprAclLine> lines, Warnings w); }
FwFromHostProtocol implements Serializable { public void applyTo(List<? super ExprAclLine> lines, Warnings w) { lines.addAll(_protocol.getLines()); } FwFromHostProtocol(HostProtocol protocol); void applyTo(List<? super ExprAclLine> lines, Warnings w);  }