test 썸네일형 리스트형 Spring boot Mockito Example - @Mock & @InjectMocks @SpringBootTest class StudentRepositoryTest { @Autowired Student student; @Autowired StudentGrades studentGrades; @Mock private StudentRepository studentRepository; @InjectMocks // inject mock dependencies private StudentService studentService; @BeforeEach void beforeEach() { student.setFirstName("Eric"); student.setLastName("King"); student.setEmailAddress("eric.roby@asdf.com"); student.setStud.. 더보기 Java Conditional Unit Test @Test @Disabled("Don't run until JIRA #123 is resolved") void testDisabled(){ // } @Test @EnabledOnOs(OS.WINDOWS) void testForWindowsOnly(){ } @Test @EnabledOnOs(OS.MAC) void testForMacOnly(){ } @Test @EnabledOnOs({OS.MAC,OS.WINDOWS}) void testForMacAndWindowsOnly(){ } @Test @EnabledOnOs(OS.LINUX) void testForLinuxOnly(){ } @Test @EnabledOnJre(JRE.JAVA_17) void testForJava17(){ } @Test @EnabledO.. 더보기 이전 1 다음