jooby project (#2330)
* moving jmh into libraries module * refactoring jmh * Update pom.xml * manual algorightm * with BM result * fix for space issue * Fixed indentation * change as per suggestion * vavr either * adding unit test and othe rutilities * adding concurrent module * concurrent package description * concurrent package description * Update EitherUnitTest.java * introducing lambda expression * jooby project * jooby project
This commit is contained in:
committed by
Grzegorz Piwowarek
parent
5c1bf55e34
commit
244a678b46
@@ -0,0 +1,29 @@
|
||||
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 AppTest {
|
||||
|
||||
@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("/");
|
||||
assertEquals("Hello World!", result);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user