Codota Logo
ReactiveWebApplicationContextRunner.run
Code IndexAdd Codota to your IDE (free)

How to use
run
method
in
org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner

Best Java code snippets using org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner.run (Showing top 10 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: spring-cloud/spring-cloud-gateway

@Test
public void nettyHttpClientDefaults() {
  new ReactiveWebApplicationContextRunner()
      .withConfiguration(AutoConfigurations.of(WebFluxAutoConfiguration.class,
          MetricsAutoConfiguration.class,
          SimpleMetricsExportAutoConfiguration.class,
          GatewayAutoConfiguration.class))
      .withPropertyValues("debug=true")
      .run(context -> {
        assertThat(context).hasSingleBean(HttpClient.class);
        HttpClient httpClient = context.getBean(HttpClient.class);
        /*FIXME: 2.1.0
        HttpClientOptions options = httpClient.options();
        PoolResources poolResources = options.getPoolResources();
        assertThat(poolResources).isNotNull();
        //TODO: howto test PoolResources
        ClientProxyOptions proxyOptions = options.getProxyOptions();
        assertThat(proxyOptions).isNull();
        SslContext sslContext = options.sslContext();
        assertThat(sslContext).isNull();*/
      });
}
origin: spring-cloud/spring-cloud-gateway

    "spring.cloud.gateway.httpclient.pool.type=fixed",
    "spring.cloud.gateway.httpclient.proxy.host=myhost")
.run(context -> {
  assertThat(context).hasSingleBean(HttpClient.class);
  HttpClient httpClient = context.getBean(HttpClient.class);
origin: spring-cloud/spring-cloud-open-service-broker

@Test
public void apiVersionBeansAreNotCreatedWithoutServiceBeans() {
  webApplicationContextRunner()
      .run((context) -> {
        assertThat(context).doesNotHaveBean(BrokerApiVersion.class);
        assertThat(context).doesNotHaveBean(ApiVersionWebFilter.class);
      });
}
origin: spring-cloud/spring-cloud-open-service-broker

@Test
public void controllersAreNotCreatedWithoutRequiredServices() {
  webApplicationContextRunner()
      .run(context -> assertThat(context.getStartupFailure())
            .isExactlyInstanceOf(UnsatisfiedDependencyException.class));
}
origin: spring-cloud/spring-cloud-open-service-broker

@Test
public void controllersAreCreated() {
  webApplicationContextRunner()
      .withUserConfiguration(FullServicesConfiguration.class)
      .run((context) -> {
        assertThat(context).hasSingleBean(CatalogController.class);
        assertThat(context).hasSingleBean(ServiceInstanceController.class);
        assertThat(context).hasSingleBean(ServiceInstanceBindingController.class);
      });
}
origin: spring-cloud/spring-cloud-open-service-broker

@Test
public void apiVersionBeansAreCreatedWithCustomVersion() {
  webApplicationContextRunner()
      .withUserConfiguration(ServicesConfiguration.class, CustomBrokerApiVersionConfigurationFromBean.class)
      .run((context) -> {
        assertThat(context).getBean(BrokerApiVersion.class)
            .hasFieldOrPropertyWithValue("apiVersion", API_VERSION_CURRENT);
        assertThat(context).hasSingleBean(ApiVersionWebFilter.class);
      });
}
origin: spring-cloud/spring-cloud-open-service-broker

@Test
public void apiVersionBeansAreCreatedWithDefault() {
  webApplicationContextRunner()
      .withUserConfiguration(ServicesConfiguration.class)
      .run((context) -> {
        assertThat(context).getBean(BrokerApiVersion.class)
            .hasFieldOrPropertyWithValue("apiVersion", API_VERSION_ANY);
        assertThat(context).hasSingleBean(ApiVersionWebFilter.class);
      });
}
origin: spring-cloud/spring-cloud-open-service-broker

@Test
public void apiVersionBeansAreCreatedFromCustomVersionProperty() {
  webApplicationContextRunner()
      .withUserConfiguration(ServicesConfiguration.class, CustomBrokerApiVersionConfigurationFromProperty.class)
      .run((context) -> {
        assertThat(context).getBean(BrokerApiVersion.class)
            .hasFieldOrPropertyWithValue("apiVersion", "42.321");
        assertThat(context).hasSingleBean(ApiVersionWebFilter.class);
      });
}
origin: spring-cloud/spring-cloud-open-service-broker

@Test
public void apiVersionCheckIsDisabled() {
  webApplicationContextRunner()
      .withUserConfiguration(ServicesConfiguration.class)
      .withPropertyValues("spring.cloud.openservicebroker.api-version-check-enabled=false")
      .run((context) -> {
        assertThat(context).doesNotHaveBean(BrokerApiVersion.class);
        assertThat(context).doesNotHaveBean(ApiVersionWebFilter.class);
      });
}
origin: spring-cloud/spring-cloud-open-service-broker

@Test
public void apiVersionBeansAreCreatedFromCustomVersionBeanOverridesProperty() {
  webApplicationContextRunner()
      .withUserConfiguration(ServicesConfiguration.class, CustomBrokerApiVersionConfigurationFromBeanAndProperty.class)
      .run((context) -> {
        assertThat(context).getBean(BrokerApiVersion.class)
            .hasFieldOrPropertyWithValue("apiVersion", "99.999");
        assertThat(context).hasSingleBean(ApiVersionWebFilter.class);
      });
}
org.springframework.boot.test.context.runnerReactiveWebApplicationContextRunnerrun

Popular methods of ReactiveWebApplicationContextRunner

  • <init>
  • withConfiguration
  • withPropertyValues
  • withUserConfiguration

Popular in Java

  • Reading from database using SQL prepared statement
  • getResourceAsStream (ClassLoader)
  • getExternalFilesDir (Context)
  • putExtra (Intent)
  • InputStreamReader (java.io)
    An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes
  • Permission (java.security)
    Abstract class for representing access to a system resource. All permissions have a name (whose inte
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • JOptionPane (javax.swing)
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now