Skip to content

Commit

Permalink
test(#150): AssignExaminationNumberServiceTest
Browse files Browse the repository at this point in the history
- 수험번호 변경사항에 따라 수정했어요.
  • Loading branch information
cabbage16 committed Oct 12, 2024
1 parent 7433e9e commit de81e22
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;

import javax.swing.text.html.Option;

import java.util.Optional;

import static org.junit.jupiter.api.Assertions.*;
Expand All @@ -31,14 +29,14 @@ class AssignExaminationNumberServiceTest {
void 수험번호를_부여한다() {
// given
Form form = FormFixture.createForm(FormType.REGULAR);
given(formRepository.findMaxExaminationNumber(2000L, 3000L)).willReturn(Optional.of(2005L));
given(formRepository.findMaxExaminationNumber(1000L, 2000L)).willReturn(Optional.of(1005L));

// when
assignExaminationNumberService.execute(form);

// then
assertEquals(2006L, form.getExaminationNumber());
verify(formRepository).findMaxExaminationNumber(2000L, 3000L);
assertEquals(1006L, form.getExaminationNumber());
verify(formRepository).findMaxExaminationNumber(1000L, 2000L);
}

@Test
Expand Down

0 comments on commit de81e22

Please sign in to comment.