Search in sources :

Example 1 with ReactiveWebServerApplicationContext

use of cn.taketoday.framework.web.reactive.context.ReactiveWebServerApplicationContext in project today-framework by TAKETODAY.

the class MissingWebServerFactoryBeanFailureAnalyzerTests method missingReactiveWebServerFactoryBeanFailure.

@Test
void missingReactiveWebServerFactoryBeanFailure() {
    ApplicationContextException failure = createFailure(new ReactiveWebServerApplicationContext());
    FailureAnalysis analysis = new MissingWebServerFactoryBeanFailureAnalyzer().analyze(failure);
    assertThat(analysis).isNotNull();
    assertThat(analysis.getDescription()).isEqualTo("Web application could not be started as there was no " + ReactiveWebServerFactory.class.getName() + " bean defined in the context.");
    assertThat(analysis.getAction()).isEqualTo("Check your application's dependencies for a supported reactive_web web server.\nCheck the configured web " + "application type.");
}
Also used : ReactiveWebServerApplicationContext(cn.taketoday.framework.web.reactive.context.ReactiveWebServerApplicationContext) ReactiveWebServerFactory(cn.taketoday.framework.web.reactive.server.ReactiveWebServerFactory) FailureAnalysis(cn.taketoday.framework.diagnostics.FailureAnalysis) ApplicationContextException(cn.taketoday.context.ApplicationContextException) Test(org.junit.jupiter.api.Test)

Example 2 with ReactiveWebServerApplicationContext

use of cn.taketoday.framework.web.reactive.context.ReactiveWebServerApplicationContext in project today-infrastructure by TAKETODAY.

the class MissingWebServerFactoryBeanFailureAnalyzerTests method missingReactiveWebServerFactoryBeanFailure.

@Test
void missingReactiveWebServerFactoryBeanFailure() {
    ApplicationContextException failure = createFailure(new ReactiveWebServerApplicationContext());
    FailureAnalysis analysis = new MissingWebServerFactoryBeanFailureAnalyzer().analyze(failure);
    assertThat(analysis).isNotNull();
    assertThat(analysis.getDescription()).isEqualTo("Web application could not be started as there was no " + ReactiveWebServerFactory.class.getName() + " bean defined in the context.");
    assertThat(analysis.getAction()).isEqualTo("Check your application's dependencies for a supported reactive_web web server.\nCheck the configured web " + "application type.");
}
Also used : ReactiveWebServerApplicationContext(cn.taketoday.framework.web.reactive.context.ReactiveWebServerApplicationContext) ReactiveWebServerFactory(cn.taketoday.framework.web.reactive.server.ReactiveWebServerFactory) FailureAnalysis(cn.taketoday.framework.diagnostics.FailureAnalysis) ApplicationContextException(cn.taketoday.context.ApplicationContextException) Test(org.junit.jupiter.api.Test)

Aggregations

ApplicationContextException (cn.taketoday.context.ApplicationContextException)2 FailureAnalysis (cn.taketoday.framework.diagnostics.FailureAnalysis)2 ReactiveWebServerApplicationContext (cn.taketoday.framework.web.reactive.context.ReactiveWebServerApplicationContext)2 ReactiveWebServerFactory (cn.taketoday.framework.web.reactive.server.ReactiveWebServerFactory)2 Test (org.junit.jupiter.api.Test)2