반응형
Verify
-
Spring boot Throwing Exception testTech/SpringBoot 2022. 5. 22. 12:05
@SpringBootTest class StudentRepositoryTest { @Autowired Student student; @Autowired StudentGrades studentGrades; @MockBean private StudentRepository studentRepository; @Autowired private StudentService studentService; @Autowired private ApplicationContext context; @DisplayName("Throw runtime error") @Test void throwRuntimeError() { Student nullStudent = (Student)context.getBean("Student"); doTh..