src/test/java/com/example/demo/DemoApplicationTests.java gelöscht
This commit is contained in:
@@ -1,25 +0,0 @@
|
|||||||
package com.example.demo;
|
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
|
||||||
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
|
|
||||||
import org.springframework.boot.test.web.client.TestRestTemplate;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
|
||||||
|
|
||||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
|
|
||||||
class DemoApplicationTests {
|
|
||||||
|
|
||||||
@Test
|
|
||||||
void contextLoads() {
|
|
||||||
}
|
|
||||||
|
|
||||||
//@Autowired
|
|
||||||
//private TestRestTemplate restTemplate;
|
|
||||||
|
|
||||||
@Test
|
|
||||||
void homeResponse() {
|
|
||||||
String body = this.restTemplate.getForObject("/", String.class);
|
|
||||||
assertEquals("Spring is here!", body);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user