-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feat] 지원서 엑셀 파일 생성 시각 API 구현 (#107)
* [chore] 지원서 엑셀 파일 생성 시각 API * [test] 지원서 엑셀 파일 생성 시각 API (#105)
- Loading branch information
Showing
5 changed files
with
65 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/test/java/ceos/backend/domain/application/ApplicationControllerTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package ceos.backend.domain.application; | ||
|
||
import org.junit.jupiter.api.DisplayName; | ||
import org.junit.jupiter.api.Test; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; | ||
import org.springframework.boot.test.context.SpringBootTest; | ||
import org.springframework.test.web.servlet.MockMvc; | ||
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; | ||
import org.springframework.test.web.servlet.result.MockMvcResultMatchers; | ||
|
||
@SpringBootTest | ||
@AutoConfigureMockMvc | ||
public class ApplicationControllerTest { | ||
|
||
@Autowired | ||
private MockMvc mockMvc; | ||
|
||
@DisplayName("지원서 엑셀 파일 생성 시각 API - 권한 X") | ||
@Test | ||
void getApplicationExcelCreationTime() throws Exception { | ||
mockMvc.perform(MockMvcRequestBuilders.get("/applications/file/creationtime")) | ||
.andExpect(MockMvcResultMatchers.status().is(401)); | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
src/test/java/ceos/backend/domain/application/ApplicationExcelServiceTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package ceos.backend.domain.application; | ||
|
||
import ceos.backend.domain.application.dto.response.GetCreationTime; | ||
import ceos.backend.domain.application.service.ApplicationExcelService; | ||
import org.assertj.core.api.Assertions; | ||
import org.junit.jupiter.api.DisplayName; | ||
import org.junit.jupiter.api.Test; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.boot.test.context.SpringBootTest; | ||
|
||
@SpringBootTest | ||
public class ApplicationExcelServiceTest { | ||
|
||
@Autowired | ||
ApplicationExcelService applicationExcelService; | ||
|
||
@DisplayName("지원서 엑셀 파일 생성 시각") | ||
@Test | ||
public void getApplicationExcelCreationTime() throws Exception { | ||
GetCreationTime creationTime = applicationExcelService.getApplicationExcelCreationTime(); | ||
Assertions.assertThat(creationTime.getCreateAt().charAt(4)).isEqualTo('-'); | ||
Assertions.assertThat(creationTime.getCreateAt().charAt(7)).isEqualTo('-'); | ||
} | ||
} |
18 changes: 0 additions & 18 deletions
18
src/test/java/ceos/backend/domain/application/service/ApplicationServiceTest.java
This file was deleted.
Oops, something went wrong.