@Test public void Disjunction_should_accept_either_left_true_or_right_true(){ GarmadonMessageFilter.Junction left = newMockableJunction(); GarmadonMessageFilter.Junction right = newMockableJunction(); GarmadonMessageFilter.Junction filter = left.or(right); when(left.accepts(anyInt(), any())).thenReturn(true); when(right.accepts(anyInt(), any())).thenReturn(true); assertThat(filter.accepts(random.nextInt(), EventHeaderProtos.Header.getDefaultInstance()), is(true)); when(left.accepts(anyInt(), any())).thenReturn(true); when(right.accepts(anyInt(), any())).thenReturn(false); assertThat(filter.accepts(random.nextInt(), EventHeaderProtos.Header.getDefaultInstance()), is(true)); when(left.accepts(anyInt(), any())).thenReturn(false); when(right.accepts(anyInt(), any())).thenReturn(true); assertThat(filter.accepts(random.nextInt(), EventHeaderProtos.Header.getDefaultInstance()), is(true)); when(left.accepts(anyInt(), any())).thenReturn(false); when(right.accepts(anyInt(), any())).thenReturn(false); assertThat(filter.accepts(random.nextInt(), EventHeaderProtos.Header.getDefaultInstance()), is(false)); }
public static GarmadonMessageFilter.ANY any() { return GarmadonMessageFilter.ANY.INSTANCE; }
GarmadonMessageFilters { public static GarmadonMessageFilter.ANY any() { return GarmadonMessageFilter.ANY.INSTANCE; } }
GarmadonMessageFilters { public static GarmadonMessageFilter.ANY any() { return GarmadonMessageFilter.ANY.INSTANCE; } protected  GarmadonMessageFilters(); }
GarmadonMessageFilters { public static GarmadonMessageFilter.ANY any() { return GarmadonMessageFilter.ANY.INSTANCE; } protected  GarmadonMessageFilters(); static GarmadonMessageFilter.ANY any(); static GarmadonMessageFilter.NONE none(); static GarmadonMessageFilter.HeaderFilter hasTag(Header.Tag tag); static GarmadonMessageFilter.HeaderFilter hasContainerId(String id); static GarmadonMessageFilter.HeaderFilter hasFramework(String framework); static GarmadonMessageFilter.TypeFilter hasType(int type); static GarmadonMessageFilter.NotFilter not(GarmadonMessageFilter other); }
GarmadonMessageFilters { public static GarmadonMessageFilter.ANY any() { return GarmadonMessageFilter.ANY.INSTANCE; } protected  GarmadonMessageFilters(); static GarmadonMessageFilter.ANY any(); static GarmadonMessageFilter.NONE none(); static GarmadonMessageFilter.HeaderFilter hasTag(Header.Tag tag); static GarmadonMessageFilter.HeaderFilter hasContainerId(String id); static GarmadonMessageFilter.HeaderFilter hasFramework(String framework); static GarmadonMessageFilter.TypeFilter hasType(int type); static GarmadonMessageFilter.NotFilter not(GarmadonMessageFilter other);  }