We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f39471c commit 3375bccCopy full SHA for 3375bcc
src/test/java/dmu/dasom/api/domain/executive/service/ExecutiveServiceTest.java
@@ -133,6 +133,20 @@ void deleteExecutive_success() {
133
verify(executiveRepository, times(1)).delete(entity);
134
}
135
136
+ @Test
137
+ @DisplayName("임원진 멤버 삭제 - 실패")
138
+ void deleteExecutive_fail() {
139
+ // given
140
+ Long id = 999L;
141
+ when(executiveRepository.findById(id)).thenReturn(Optional.empty());
142
+
143
+ // when
144
+ CustomException exception = assertThrows(CustomException.class, () -> {executiveService.deleteExective(id);});
145
146
+ // then
147
+ assertEquals(ErrorCode.EXECUTIVE_NOT_FOUND, exception.getErrorCode());
148
+ }
149
150
@Test
151
@DisplayName("임원진 멤버 수정 - 성공")
152
void updateExecutive_success() {
0 commit comments