@Test public void testAutocomplete() { assertThat( DispositionSpecifier.autoComplete("s").stream() .map(AutocompleteSuggestion::getText) .collect(ImmutableSet.toImmutableSet()), equalTo( ImmutableSet.of( SUCCESS, INSUFFICIENT_INFO.name().toLowerCase(), DELIVERED_TO_SUBNET.name().toLowerCase(), EXITS_NETWORK.name().toLowerCase()))); assertThat( DispositionSpecifier.autoComplete("f").stream() .map(AutocompleteSuggestion::getText) .collect(ImmutableSet.toImmutableSet()), equalTo(ImmutableSet.of(FAILURE, INSUFFICIENT_INFO.name().toLowerCase()))); }
public static List<AutocompleteSuggestion> autoComplete(String query) { return AutoCompleteUtils.baseAutoComplete(query, _map.keySet()); }
DispositionSpecifier { public static List<AutocompleteSuggestion> autoComplete(String query) { return AutoCompleteUtils.baseAutoComplete(query, _map.keySet()); } }
DispositionSpecifier { public static List<AutocompleteSuggestion> autoComplete(String query) { return AutoCompleteUtils.baseAutoComplete(query, _map.keySet()); } DispositionSpecifier(Set<FlowDisposition> dispositions); }
DispositionSpecifier { public static List<AutocompleteSuggestion> autoComplete(String query) { return AutoCompleteUtils.baseAutoComplete(query, _map.keySet()); } DispositionSpecifier(Set<FlowDisposition> dispositions); @JsonValue String value(); static List<AutocompleteSuggestion> autoComplete(String query); Set<FlowDisposition> getDispositions(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
DispositionSpecifier { public static List<AutocompleteSuggestion> autoComplete(String query) { return AutoCompleteUtils.baseAutoComplete(query, _map.keySet()); } DispositionSpecifier(Set<FlowDisposition> dispositions); @JsonValue String value(); static List<AutocompleteSuggestion> autoComplete(String query); Set<FlowDisposition> getDispositions(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); @VisibleForTesting static final String SUCCESS; @VisibleForTesting static final String FAILURE; static final DispositionSpecifier SUCCESS_SPECIFIER; static final DispositionSpecifier FAILURE_SPECIFIER; }