/** This matcher always evaluates to true. */ public void anything() { verifyUsingMatcher(CoreMatchers.anything()); }
@Override public ResultValidator<T> expectSuccessfulHandlerExecution() { return expectResultMessageMatching(anything()); }
Assert.assertThat(e, CoreMatchers.not(CoreMatchers.anything()));
@Test public void largeNumberOfSlowRunningJobsShouldChangeAutoReadState() throws Exception { int numberOfRunDiscardPairs = 1000; String largeString = StringUtils.repeat( " ", 8 * 1024 ); connection.connect( address ) .send( util.defaultAcceptedVersions() ) .send( util.chunk( new InitMessage( "TestClient/1.1", emptyMap() ) ) ); assertThat( connection, util.eventuallyReceivesSelectedProtocolVersion() ); assertThat( connection, util.eventuallyReceives( msgSuccess() ) ); // when for ( int i = 0; i < numberOfRunDiscardPairs; i++ ) { connection.send( util.chunk( new RunMessage( "CALL boltissue.sleep( $data )", ValueUtils.asMapValue( singletonMap( "data", largeString ) ) ), DiscardAllMessage.INSTANCE ) ); } // expect for ( int i = 0; i < numberOfRunDiscardPairs; i++ ) { assertThat( connection, util.eventuallyReceives( msgSuccess(), msgSuccess() ) ); } logProvider.assertAtLeastOnce( AssertableLogProvider.inLog( BoltConnectionReadLimiter.class ).warn( containsString( "disabled" ), anything(), anything() ) ); logProvider.assertAtLeastOnce( AssertableLogProvider.inLog( BoltConnectionReadLimiter.class ).warn( containsString( "enabled" ), anything(), anything() ) ); }
/** * Creates a Matcher that matches a Future that has completed with a value. A * Future that is not yet completed will not be matched. */ public static Matcher<Future<?>> futureCompletedWithValue() { return futureCompletedWithValueThat(CoreMatchers.anything()); }
/** * Creates a {@link Matcher} that matches when the {@link CompletionStage} completes with a value. * * <p><strong>If the {@link CompletionStage} has not yet completed, this matcher waits for it to * finish.</strong> */ public static Matcher<CompletionStage<?>> stageWillCompleteWithValue() { return stageWillCompleteWithValueThat(anything()); }
/** * Creates a Matcher that matches a Future that has completed with a value. * * <p><strong>If the Future has not yet completed, this matcher waits for it to finish.</strong> */ public static Matcher<Future<?>> futureWillCompleteWithValue() { return futureWillCompleteWithValueThat(CoreMatchers.anything()); }
/** * Creates a Matcher that matches any Optional with a value. */ public static Matcher<Optional<?>> optionalWithValue() { return optionalWithValue(anything()); }
/** * Register new stub for contact data requests with specific activity result. * * @param contactDataUri Contact uri which will be accessible as intent data. * @param activityResult {@link Activity#RESULT_OK} or {@link Activity#RESULT_CANCELED}. * * @since Espresso Macchiato 0.6 */ public static void register(Uri contactDataUri, int activityResult) { register(contactDataUri, activityResult, anything()); }
/** * Creates a {@link Matcher} that matches a {@link CompletionStage} that has completed with a * value. A {@link CompletionStage} that is not yet completed will not be matched. */ public static Matcher<CompletionStage<?>> stageCompletedWithValue() { return stageCompletedWithValueThat(anything()); }
public Builder<SUT> valid(FsmSpec<SUT> state) { return valid(state, CoreMatchers.anything()); }
private GraphDatabaseService definedGraphDatabaseService(Object testObject) { ApplicationContext applicationContext = propertyGetter.propertyByType(testObject, ApplicationContext.class); Map<String, GraphDatabaseService> beansOfType = applicationContext.getBeansOfType(GraphDatabaseService.class); if(beansOfType == null) { throw new IllegalArgumentException( "At least one GraphDatabaseService instance should be defined into Spring Application Context."); } GraphDatabaseService graphDatabaseService = with(beansOfType).values().first(anything()); if (graphDatabaseService == null) { throw new IllegalArgumentException( "At least one GraphDatabaseService instance should be defined into Spring Application Context."); } return graphDatabaseService; }
public T getDefaultEmbeddedInstance() { T element = with(this.instances).values().first(anything()); return element; }
public Jedis getDefaultJedis() { return with(this.instances).values().first(anything()); }
public T getDefaultEmbeddedInstance() { T element = with(this.instances).values().first(anything()); return element; }
public Configuration getDefaultConfiguration() { return with(this.instances).values().first(anything()); }
public GraphDatabaseService getDefaultGraphDatabaseService() { return with(this.instances).values().first(anything()); }
public Jedis getDefaultJedis() { return with(this.instances).values().first(anything()); }
public Configuration getDefaultConfiguration() { return with(this.instances).values().first(anything()); }
/** * Performs a click on an item in an adapter view, such as GridView or ListView * @param position * @param resourceId of adapter view holding the item that should be clicked */ public static void clickAdapterViewItem(int position, int resourceId) { onData(anything()).inAdapterView(allOf(withId(resourceId), isDisplayed())) .atPosition(position).perform(click()); }