Minor cleanup

This commit is contained in:
Erik C. Thauvin 2023-11-20 23:22:39 -08:00
parent 9175393baa
commit fe849c8a59
4 changed files with 21 additions and 13 deletions

View file

@ -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!");
}
}