org.springframework.dao.IncorrectResultSizeDataAccessException: Incorrect result size: expected 1, actual 2
at org.springframework.dao.support.DataAccessUtils.nullableSingleResult([DataAccessUtils.java:193](command:_java.test.openStackTrace?%5B%22%5Ctat%20org.springframework.dao.support.DataAccessUtils.nullableSingleResult(DataAccessUtils.java%3A193)%22%2C%22Study-Management%22%5D))
at org.springframework.jdbc.core.JdbcTemplate.queryForObject([JdbcTemplate.java:520](command:_java.test.openStackTrace?%5B%22%5Ctat%20org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java%3A520)%22%2C%22Study-Management%22%5D))
at org.springframework.jdbc.core.JdbcTemplate.queryForObject([JdbcTemplate.java:526](command:_java.test.openStackTrace?%5B%22%5Ctat%20org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java%3A526)%22%2C%22Study-Management%22%5D))
at mogakco.StudyManagement.controller.StudyControllerTest.getStudyIdById([StudyControllerTest.java:264](command:_java.test.openStackTrace?%5B%22%5Ctat%20mogakco.StudyManagement.controller.StudyControllerTest.getStudyIdById(StudyControllerTest.java%3A264)%22%2C%22Study-Management%22%5D))
at mogakco.StudyManagement.controller.StudyControllerTest.deleteStudyInfoUpdate_AuthenticationFail([StudyControllerTest.java:258](command:_java.test.openStackTrace?%5B%22%5Ctat%20mogakco.StudyManagement.controller.StudyControllerTest.deleteStudyInfoUpdate_AuthenticationFail(StudyControllerTest.java%3A258)%22%2C%22Study-Management%22%5D))
at java.base/java.util.ArrayList.forEach([ArrayList.java:1511](command:_java.test.openStackTrace?%5B%22%5Ctat%20java.base%2Fjava.util.ArrayList.forEach(ArrayList.java%3A1511)%22%2C%22Study-Management%22%5D))
at java.base/java.util.ArrayList.forEach([ArrayList.java:1511](command:_java.test.openStackTrace?%5B%22%5Ctat%20java.base%2Fjava.util.ArrayList.forEach(ArrayList.java%3A1511)%22%2C%22Study-Management%22%5D))
에러 메세지를 보니 study가 study_info 테이블에 등록되어 있는 경우를 고려하지 않은 테스트 케이스 인것 같아요!
시간 나실 때 확인 부탁드립니다~!
안녕하세요 @MeMyself-And-I !
다음과 같이 studyControllerTest에서 몇 가지 에러가 발생합니다!
에러 메세지를 보니 study가 study_info 테이블에 등록되어 있는 경우를 고려하지 않은 테스트 케이스 인것 같아요! 시간 나실 때 확인 부탁드립니다~!