JAVA-959: Migrate spring-katharsis to com.baeldung
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package com.baeldung;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = Application.class)
|
||||
public class SpringContextTest {
|
||||
|
||||
@Test
|
||||
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.baeldung.test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import io.restassured.RestAssured;
|
||||
import io.restassured.response.Response;
|
||||
|
||||
public class JsonApiLiveTest {
|
||||
|
||||
private final static String URL_PREFIX = "http://localhost:8082/spring-katharsis/users";
|
||||
|
||||
@Test
|
||||
public void whenGettingAllUsers_thenCorrect() {
|
||||
final Response response = RestAssured.get(URL_PREFIX);
|
||||
assertEquals(200, response.statusCode());
|
||||
System.out.println(response.asString());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user