mocking 하는 방법
import static org.mockito.Mockito.mock; public class TestClass { @ParameterizedTest public void test() { DummyRepository repository = mock(DummyRepository.class); DummyService service = new DummyService(repository); DummyClass dummy = new DummyClass(); Param param = new Param(); given(repository.getById(dummy.getId())).willReturn(dummy); service.update(dummy.getId(), param, "username"); assertTh..
spring boot/snippets
2021. 12. 22. 23:15
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday