From 5c11cbce4ef021df3b4730a0c2120e9eb1cbe6f4 Mon Sep 17 00:00:00 2001 From: wenjinda Date: Sat, 17 Oct 2020 22:50:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=20DemoApplicationTests.java?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../example/demo/DemoApplicationTests.java | 28 ------------------- 1 file changed, 28 deletions(-) delete mode 100644 src/test/java/com/example/demo/DemoApplicationTests.java diff --git a/src/test/java/com/example/demo/DemoApplicationTests.java b/src/test/java/com/example/demo/DemoApplicationTests.java deleted file mode 100644 index 8595e84..0000000 --- a/src/test/java/com/example/demo/DemoApplicationTests.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.example.demo; - -import org.junit.Test; -import org.junit.runner.RunWith; -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 org.springframework.test.context.junit4.SpringRunner; -import static org.assertj.core.api.Assertions.assertThat; - -@RunWith(SpringRunner.class) -@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) -public class DemoApplicationTests { - - @Test - public void contextLoads() { - } - - @Autowired - private TestRestTemplate restTemplate; - - @Test - public void homeResponse() { - String body = this.restTemplate.getForObject("/", String.class); - assertThat(body).isEqualTo("Spring is here!"); - } -} -- GitLab