Remove unused imports
All checks were successful
Build PR / Build and analyze (pull_request) Successful in 1m26s
gitea-sonarqube-bot OK
Quality Check / Tests (pull_request) Successful in 37s
Quality Check / Checkstyle Main (pull_request) Successful in 31s

This commit is contained in:
Phan Huy Tran 2024-10-02 09:01:03 +02:00
parent beff4aa971
commit 785fa87222

@ -2,29 +2,23 @@ package de.szut.lf8_starter.integration.project;
import de.szut.lf8_starter.project.ProjectEntity; import de.szut.lf8_starter.project.ProjectEntity;
import de.szut.lf8_starter.project.ProjectRepository; import de.szut.lf8_starter.project.ProjectRepository;
import org.json.JSONObject;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.http.MediaType;
import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MockMvc;
import java.time.LocalDate; import java.time.LocalDate;
import java.util.Arrays;
import java.util.List; import java.util.List;
import static org.assertj.core.api.Assertions.assertThat;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.collection.IsCollectionWithSize.hasSize; import static org.hamcrest.collection.IsCollectionWithSize.hasSize;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
@SpringBootTest @SpringBootTest
@AutoConfigureMockMvc(addFilters = false) @AutoConfigureMockMvc(addFilters = false)
public class FindProjectActionTest { class FindProjectActionTest {
@Autowired @Autowired
private MockMvc mockMvc; private MockMvc mockMvc;
@Autowired @Autowired
@ -41,7 +35,7 @@ public class FindProjectActionTest {
project.setLeadingEmployee(1); project.setLeadingEmployee(1);
project.setName("name"); project.setName("name");
project.setStartDate(LocalDate.of(2021, 1, 1)); project.setStartDate(LocalDate.of(2021, 1, 1));
project.setEmployees(List.of(1L,2L,3L)); project.setEmployees(List.of(1L, 2L, 3L));
this.projectRepository.save(project); this.projectRepository.save(project);
this.mockMvc.perform(get("/projects/1")) this.mockMvc.perform(get("/projects/1"))