Skip to content

Commit 6b83fcd

Browse files
dkapilEugen
authored andcommitted
Task/bael 10882 fixes2 (eugenp#6278)
* BAEL-10882 Fixed failing unit tests * BAEL-10882 Fixed failing unit tests
1 parent 034869f commit 6b83fcd

File tree

3 files changed

+22
-14
lines changed

3 files changed

+22
-14
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package com.baeldung.jooby;
2+
3+
import static io.restassured.RestAssured.get;
4+
import static org.hamcrest.Matchers.equalTo;
5+
6+
import org.jooby.test.JoobyRule;
7+
import org.junit.ClassRule;
8+
import org.junit.Test;
9+
10+
public class AppLiveTest {
11+
12+
@ClassRule
13+
public static JoobyRule app = new JoobyRule(new App());
14+
15+
@Test
16+
public void given_defaultUrl_expect_fixedString() {
17+
get("/").then().assertThat().body(equalTo("Hello World!")).statusCode(200)
18+
.contentType("text/html;charset=UTF-8");
19+
}
20+
21+
}

jooby/src/test/java/com/baeldung/jooby/AppUnitTest.java

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,12 @@
11
package com.baeldung.jooby;
22

3-
import static io.restassured.RestAssured.get;
4-
import static org.hamcrest.Matchers.equalTo;
53
import static org.junit.Assert.assertEquals;
64

7-
import org.jooby.test.JoobyRule;
85
import org.jooby.test.MockRouter;
9-
import org.junit.ClassRule;
106
import org.junit.Test;
117

128
public class AppUnitTest {
139

14-
@ClassRule
15-
public static JoobyRule app = new JoobyRule(new App());
16-
17-
@Test
18-
public void given_defaultUrl_expect_fixedString() {
19-
get("/").then().assertThat().body(equalTo("Hello World!")).statusCode(200)
20-
.contentType("text/html;charset=UTF-8");
21-
}
22-
2310
@Test
2411
public void given_defaultUrl_with_mockrouter_expect_fixedString() throws Throwable {
2512
String result = new MockRouter(new App()).get("/");

spring-5-reactive-oauth/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@
6262
<plugin>
6363
<groupId>org.apache.maven.plugins</groupId>
6464
<artifactId>maven-surefire-plugin</artifactId>
65-
<version>2.20.1</version>
6665
<configuration>
6766
<testFailureIgnore>true</testFailureIgnore>
6867
<excludes>
6968
<exclude>**/*IntegrationTest.java</exclude>
69+
<exclude>**/*LiveTest.java</exclude>
7070
</excludes>
7171
</configuration>
7272
</plugin>

0 commit comments

Comments
 (0)