-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
282 additions
and
33 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
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
16 changes: 16 additions & 0 deletions
16
application/src/main/java/com/terte/repository/menu/OptionRepository.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
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
60 changes: 60 additions & 0 deletions
60
application/src/test/java/com/terte/controller/menu/ChoiceControllerIntegrationTest.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,60 @@ | ||
package com.terte.controller.menu; | ||
|
||
import com.fasterxml.jackson.databind.ObjectMapper; | ||
import com.terte.TerteMainApplication; | ||
import org.junit.jupiter.api.DisplayName; | ||
import org.junit.jupiter.api.MethodOrderer; | ||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.TestMethodOrder; | ||
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.http.MediaType; | ||
import org.springframework.test.web.servlet.MockMvc; | ||
|
||
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; | ||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; | ||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; | ||
|
||
@SpringBootTest(classes = TerteMainApplication.class) | ||
@AutoConfigureMockMvc | ||
@TestMethodOrder(MethodOrderer.OrderAnnotation.class) | ||
public class ChoiceControllerIntegrationTest { | ||
@Autowired | ||
private MockMvc mockMvc; | ||
|
||
@Autowired | ||
ObjectMapper objectMapper; | ||
|
||
|
||
@Test | ||
@DisplayName("옵션ID로 선택지를 조회할 때 존재하지 않는 옵션ID를 요청하면 404를 반환한다.") | ||
void testGetChoicesByNonExistingOptionId() { | ||
} | ||
|
||
@Test | ||
@DisplayName("선택지를 생성한다.") | ||
void testCreateChoice() { | ||
} | ||
|
||
@Test | ||
@DisplayName("선택지를 수정한다.") | ||
void testUpdateChoice() { | ||
} | ||
|
||
@Test | ||
@DisplayName("존재하지 않는 선택지를 수정하려고 하면 404를 반환한다.") | ||
void testUpdateChoiceWithNonExistingChoice() { | ||
} | ||
|
||
@Test | ||
@DisplayName("선택지를 삭제한다.") | ||
void testDeleteChoice() { | ||
} | ||
|
||
@Test | ||
@DisplayName("존재하지 않는 선택지를 삭제하려고 하면 404를 반환한다.") | ||
void testDeleteNonExistingChoice() { | ||
} | ||
|
||
} |
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
Oops, something went wrong.