Skip to content

Commit

Permalink
Task/bael 10882 fixes2 (eugenp#6278)
Browse files Browse the repository at this point in the history
* BAEL-10882 Fixed failing unit tests

* BAEL-10882 Fixed failing unit tests
  • Loading branch information
dkapil authored and Eugen committed Feb 4, 2019
1 parent 034869f commit 6b83fcd
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 14 deletions.
21 changes: 21 additions & 0 deletions jooby/src/test/java/com/baeldung/jooby/AppLiveTest.java
Original file line number Diff line number Diff line change
@@ -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");
}

}
13 changes: 0 additions & 13 deletions jooby/src/test/java/com/baeldung/jooby/AppUnitTest.java
Original file line number Diff line number Diff line change
@@ -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("/");
Expand Down
2 changes: 1 addition & 1 deletion spring-5-reactive-oauth/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20.1</version>
<configuration>
<testFailureIgnore>true</testFailureIgnore>
<excludes>
<exclude>**/*IntegrationTest.java</exclude>
<exclude>**/*LiveTest.java</exclude>
</excludes>
</configuration>
</plugin>
Expand Down

0 comments on commit 6b83fcd

Please sign in to comment.