Java Code Examples for org.hamcrest.Matchers#anything()
The following examples show how to use
org.hamcrest.Matchers#anything() .
These examples are extracted from open source projects.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: beam File: WindowMatchers.java License: Apache License 2.0 | 5 votes |
public static <T> Matcher<WindowedValue<? extends T>> isWindowedValue( Matcher<? super T> valueMatcher, Matcher<? super Instant> timestampMatcher, Matcher<? super Collection<? extends BoundedWindow>> windowsMatcher) { return new WindowedValueMatcher<>( valueMatcher, timestampMatcher, windowsMatcher, Matchers.anything()); }
Example 2
Source Project: beam File: WindowMatchers.java License: Apache License 2.0 | 5 votes |
public static <T> Matcher<WindowedValue<? extends T>> isSingleWindowedValue( Matcher<? super T> valueMatcher, Matcher<? super Instant> timestampMatcher, Matcher<? super BoundedWindow> windowMatcher) { return new WindowedValueMatcher<>( valueMatcher, timestampMatcher, Matchers.contains(windowMatcher), Matchers.anything()); }
Example 3
Source Project: darcy-ui File: VisibleTextTest.java License: GNU General Public License v3.0 | 5 votes |
@Test public void shouldMatchVisibleElements() { VisibleText<Text> matcher = new VisibleText<>(Matchers.anything()); Text mockText = mock(Text.class); when(mockText.isDisplayed()).thenReturn(true); assertTrue(matcher.matches(mockText)); }
Example 4
Source Project: darcy-ui File: VisibleTextTest.java License: GNU General Public License v3.0 | 5 votes |
@Test public void shouldNotMatchNotVisibleElements() { VisibleText<Text> matcher = new VisibleText<>(Matchers.anything()); Text mockText = mock(Text.class); when(mockText.isDisplayed()).thenReturn(false); assertFalse(matcher.matches(mockText)); }
Example 5
Source Project: Flink-CEPplus File: StreamRecordMatchers.java License: Apache License 2.0 | 4 votes |
public static <T> Matcher<StreamRecord<? extends T>> isStreamRecord( Matcher<? super T> valueMatcher) { return new StreamRecordMatcher<>(valueMatcher, Matchers.anything()); }
Example 6
Source Project: Flink-CEPplus File: StreamRecordMatchers.java License: Apache License 2.0 | 4 votes |
public static <T, W extends Window> Matcher<StreamRecord<? extends WindowedValue<? extends T, ? extends W>>> isWindowedValue( Matcher<? super T> valueMatcher, long timestamp) { return new WindowedValueMatcher<>(valueMatcher, Matchers.equalTo(timestamp), Matchers.anything()); }
Example 7
Source Project: Flink-CEPplus File: StreamRecordMatchers.java License: Apache License 2.0 | 4 votes |
public static <T, W extends Window> Matcher<StreamRecord<? extends WindowedValue<? extends T, ? extends W>>> isWindowedValue( Matcher<? super T> valueMatcher) { return new WindowedValueMatcher<>(valueMatcher, Matchers.anything(), Matchers.anything()); }
Example 8
Source Project: Flink-CEPplus File: StreamRecordMatchers.java License: Apache License 2.0 | 4 votes |
public static <T, W extends Window> Matcher<StreamRecord<? extends WindowedValue<? extends T, ? extends W>>> isWindowedValue( Matcher<? super T> valueMatcher, Matcher<? super Long> timestampMatcher) { return new WindowedValueMatcher<>(valueMatcher, timestampMatcher, Matchers.anything()); }
Example 9
Source Project: flink File: StreamRecordMatchers.java License: Apache License 2.0 | 4 votes |
public static <T> Matcher<StreamRecord<? extends T>> isStreamRecord( Matcher<? super T> valueMatcher) { return new StreamRecordMatcher<>(valueMatcher, Matchers.anything()); }
Example 10
Source Project: flink File: StreamRecordMatchers.java License: Apache License 2.0 | 4 votes |
public static <T, W extends Window> Matcher<StreamRecord<? extends WindowedValue<? extends T, ? extends W>>> isWindowedValue( Matcher<? super T> valueMatcher, long timestamp) { return new WindowedValueMatcher<>(valueMatcher, Matchers.equalTo(timestamp), Matchers.anything()); }
Example 11
Source Project: flink File: StreamRecordMatchers.java License: Apache License 2.0 | 4 votes |
public static <T, W extends Window> Matcher<StreamRecord<? extends WindowedValue<? extends T, ? extends W>>> isWindowedValue( Matcher<? super T> valueMatcher) { return new WindowedValueMatcher<>(valueMatcher, Matchers.anything(), Matchers.anything()); }
Example 12
Source Project: flink File: StreamRecordMatchers.java License: Apache License 2.0 | 4 votes |
public static <T, W extends Window> Matcher<StreamRecord<? extends WindowedValue<? extends T, ? extends W>>> isWindowedValue( Matcher<? super T> valueMatcher, Matcher<? super Long> timestampMatcher) { return new WindowedValueMatcher<>(valueMatcher, timestampMatcher, Matchers.anything()); }
Example 13
Source Project: beam File: WindowMatchers.java License: Apache License 2.0 | 4 votes |
public static <T> Matcher<WindowedValue<? extends T>> isWindowedValue( Matcher<? super T> valueMatcher, Matcher<? super Instant> timestampMatcher) { return new WindowedValueMatcher<>( valueMatcher, timestampMatcher, Matchers.anything(), Matchers.anything()); }
Example 14
Source Project: beam File: WindowMatchers.java License: Apache License 2.0 | 4 votes |
public static <T> Matcher<WindowedValue<? extends T>> isWindowedValue( Matcher<? super T> valueMatcher) { return new WindowedValueMatcher<>( valueMatcher, Matchers.anything(), Matchers.anything(), Matchers.anything()); }
Example 15
Source Project: espresso-cucumber File: SpoonScreenshotAction.java License: Apache License 2.0 | 4 votes |
@Override public Matcher<View> getConstraints() { return Matchers.anything(); }
Example 16
Source Project: flink File: StreamRecordMatchers.java License: Apache License 2.0 | 4 votes |
public static <T> Matcher<StreamRecord<? extends T>> streamRecord( Matcher<? super T> valueMatcher) { return new StreamRecordMatcher<>(valueMatcher, Matchers.anything()); }
Example 17
Source Project: flink File: StreamRecordMatchers.java License: Apache License 2.0 | 4 votes |
public static <T, W extends Window> Matcher<StreamRecord<? extends WindowedValue<? extends T, ? extends W>>> isWindowedValue( Matcher<? super T> valueMatcher, long timestamp) { return new WindowedValueMatcher<>(valueMatcher, Matchers.equalTo(timestamp), Matchers.anything()); }
Example 18
Source Project: flink File: StreamRecordMatchers.java License: Apache License 2.0 | 4 votes |
public static <T, W extends Window> Matcher<StreamRecord<? extends WindowedValue<? extends T, ? extends W>>> isWindowedValue( Matcher<? super T> valueMatcher) { return new WindowedValueMatcher<>(valueMatcher, Matchers.anything(), Matchers.anything()); }
Example 19
Source Project: flink File: StreamRecordMatchers.java License: Apache License 2.0 | 4 votes |
public static <T, W extends Window> Matcher<StreamRecord<? extends WindowedValue<? extends T, ? extends W>>> isWindowedValue( Matcher<? super T> valueMatcher, Matcher<? super Long> timestampMatcher) { return new WindowedValueMatcher<>(valueMatcher, timestampMatcher, Matchers.anything()); }