From 367f62ee0204fa5dc9cde765065c11667ae6f383 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torbj=C3=B8rn=20Antonsen?= <torbjant@ntnu.no> Date: Thu, 4 Apr 2024 12:13:53 +0200 Subject: [PATCH] Removed unnecessary files created at project initialization --- .../idatt2105/controller/HelloController.java | 15 ----------- .../edu/ntnu/idatt2105/CheckHTTPResponse.java | 26 ------------------- 2 files changed, 41 deletions(-) delete mode 100644 FullstackProsjekt/src/backend/main/java/edu/ntnu/idatt2105/controller/HelloController.java delete mode 100644 FullstackProsjekt/src/backend/test/java/edu/ntnu/idatt2105/CheckHTTPResponse.java diff --git a/FullstackProsjekt/src/backend/main/java/edu/ntnu/idatt2105/controller/HelloController.java b/FullstackProsjekt/src/backend/main/java/edu/ntnu/idatt2105/controller/HelloController.java deleted file mode 100644 index d6645c2..0000000 --- a/FullstackProsjekt/src/backend/main/java/edu/ntnu/idatt2105/controller/HelloController.java +++ /dev/null @@ -1,15 +0,0 @@ -package edu.ntnu.idatt2105.controller; - -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; - -@Controller -public class HelloController { - - @RequestMapping("/") - public ResponseEntity<String> helloWorld(){ - return new ResponseEntity<>("Hello", HttpStatus.OK); - } -} \ No newline at end of file diff --git a/FullstackProsjekt/src/backend/test/java/edu/ntnu/idatt2105/CheckHTTPResponse.java b/FullstackProsjekt/src/backend/test/java/edu/ntnu/idatt2105/CheckHTTPResponse.java deleted file mode 100644 index 4272e61..0000000 --- a/FullstackProsjekt/src/backend/test/java/edu/ntnu/idatt2105/CheckHTTPResponse.java +++ /dev/null @@ -1,26 +0,0 @@ -package edu.ntnu.idatt2105; - - -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.boot.test.web.server.LocalServerPort; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) -public class CheckHTTPResponse { - @LocalServerPort - private int port; - - @Autowired - private TestRestTemplate testRestTemplate; - - @Test - public void shouldPassIfStringMatches(){ - assertEquals("Hello World from Spring Boot", - testRestTemplate.getForObject("http://localhost:" + port + "/", - String.class)); - } -} -- GitLab