Minor cleanup
This commit is contained in:
parent
9175393baa
commit
fe849c8a59
4 changed files with 21 additions and 13 deletions
|
@ -29,8 +29,8 @@ public class ApplicationBuild extends WebProject {
|
|||
.include(dependency("org.springframework.boot:spring-boot-starter-web:3.1.5"));
|
||||
scope(test)
|
||||
.include(dependency("org.springframework.boot:spring-boot-starter-test:3.1.5"))
|
||||
.include(dependency("org.junit.jupiter:junit-jupiter:5.10.0"))
|
||||
.include(dependency("org.junit.platform:junit-platform-console-standalone:1.10.0"));
|
||||
.include(dependency("org.junit.jupiter:junit-jupiter:5.10.1"))
|
||||
.include(dependency("org.junit.platform:junit-platform-console-standalone:1.10.1"));
|
||||
scope(standalone)
|
||||
.include(dependency("org.springframework.boot:spring-boot-loader:3.1.5"));
|
||||
}
|
||||
|
|
|
@ -4,7 +4,6 @@ import org.junit.jupiter.api.Test;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.boot.test.web.client.TestRestTemplate;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
|
@ -13,13 +12,13 @@ public class HelloControllerIT {
|
|||
@Autowired
|
||||
private TestRestTemplate template;
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
public static void main(String[] args) {
|
||||
new HelloControllerIT().getHello();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getHello() throws Exception {
|
||||
ResponseEntity<String> response = template.getForEntity("/", String.class);
|
||||
public void getHello() {
|
||||
var response = template.getForEntity("/", String.class);
|
||||
assertThat(response.getBody()).isEqualTo("Greetings from Spring Boot!");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue