From 6b83fcde01cc45188fc13dfb94f921e4bb8d2203 Mon Sep 17 00:00:00 2001 From: Dhawal Kapil Date: Mon, 4 Feb 2019 20:27:33 +0530 Subject: [PATCH] Task/bael 10882 fixes2 (#6278) * BAEL-10882 Fixed failing unit tests * BAEL-10882 Fixed failing unit tests --- .../java/com/baeldung/jooby/AppLiveTest.java | 21 +++++++++++++++++++ .../java/com/baeldung/jooby/AppUnitTest.java | 13 ------------ spring-5-reactive-oauth/pom.xml | 2 +- 3 files changed, 22 insertions(+), 14 deletions(-) create mode 100644 jooby/src/test/java/com/baeldung/jooby/AppLiveTest.java diff --git a/jooby/src/test/java/com/baeldung/jooby/AppLiveTest.java b/jooby/src/test/java/com/baeldung/jooby/AppLiveTest.java new file mode 100644 index 000000000000..1bd12f8bb36d --- /dev/null +++ b/jooby/src/test/java/com/baeldung/jooby/AppLiveTest.java @@ -0,0 +1,21 @@ +package com.baeldung.jooby; + +import static io.restassured.RestAssured.get; +import static org.hamcrest.Matchers.equalTo; + +import org.jooby.test.JoobyRule; +import org.junit.ClassRule; +import org.junit.Test; + +public class AppLiveTest { + + @ClassRule + public static JoobyRule app = new JoobyRule(new App()); + + @Test + public void given_defaultUrl_expect_fixedString() { + get("/").then().assertThat().body(equalTo("Hello World!")).statusCode(200) + .contentType("text/html;charset=UTF-8"); + } + +} diff --git a/jooby/src/test/java/com/baeldung/jooby/AppUnitTest.java b/jooby/src/test/java/com/baeldung/jooby/AppUnitTest.java index ab7388f5f4ec..9bca30e2c136 100644 --- a/jooby/src/test/java/com/baeldung/jooby/AppUnitTest.java +++ b/jooby/src/test/java/com/baeldung/jooby/AppUnitTest.java @@ -1,25 +1,12 @@ package com.baeldung.jooby; -import static io.restassured.RestAssured.get; -import static org.hamcrest.Matchers.equalTo; import static org.junit.Assert.assertEquals; -import org.jooby.test.JoobyRule; import org.jooby.test.MockRouter; -import org.junit.ClassRule; import org.junit.Test; public class AppUnitTest { - @ClassRule - public static JoobyRule app = new JoobyRule(new App()); - - @Test - public void given_defaultUrl_expect_fixedString() { - get("/").then().assertThat().body(equalTo("Hello World!")).statusCode(200) - .contentType("text/html;charset=UTF-8"); - } - @Test public void given_defaultUrl_with_mockrouter_expect_fixedString() throws Throwable { String result = new MockRouter(new App()).get("/"); diff --git a/spring-5-reactive-oauth/pom.xml b/spring-5-reactive-oauth/pom.xml index 73809681f284..4e05227c6c5b 100644 --- a/spring-5-reactive-oauth/pom.xml +++ b/spring-5-reactive-oauth/pom.xml @@ -62,11 +62,11 @@ org.apache.maven.plugins maven-surefire-plugin - 2.20.1 true **/*IntegrationTest.java + **/*LiveTest.java