게시글
질문&답변
2021.11.10
기능테스트시, setName() 등 메서드 오류
Starting Gradle Daemon... Gradle Daemon started in 2 s 904 ms > Task :compileJava > Task :processResources UP-TO-DATE > Task :classes > Task :compileTestJava FAILED C:\������\Ȱ��1\jpashop\src\test\java\jpabook\jpashop\service\OrderServiceTest.java:47: error: cannot find symbol Long orderId = orderService.order(member.getId(), book.getId(), orderCount); ^ symbol: method getId() location: variable book of type Book C:\������\Ȱ��1\jpashop\src\test\java\jpabook\jpashop\service\OrderServiceTest.java:55: error: cannot find symbol assertEquals("�ֹ� ������ŭ ��� �پ�� �Ѵ�.", 8, book.getStockQuantity()); ^ symbol: method getStockQuantity() location: variable book of type Book C:\������\Ȱ��1\jpashop\src\test\java\jpabook\jpashop\service\OrderServiceTest.java:68: error: cannot find symbol Long orderId = orderService.order(member.getId(), item.getId(), orderCount); ^ symbol: method getId() location: variable item of type Book C:\������\Ȱ��1\jpashop\src\test\java\jpabook\jpashop\service\OrderServiceTest.java:75: error: cannot find symbol assertEquals("�ֹ��� ��ҵ� ��ǰ�� ��ŭ ��� �����ؾ��Ѵ�.", 10, item.getStockQuantity()); ^ symbol: method getStockQuantity() location: variable item of type Book C:\������\Ȱ��1\jpashop\src\test\java\jpabook\jpashop\service\OrderServiceTest.java:87: error: incompatible types: Book cannot be converted to Item Item item = createBook("�ð� JPA", 10000, 10); ^ C:\������\Ȱ��1\jpashop\src\test\java\jpabook\jpashop\service\OrderServiceTest.java:101: error: cannot find symbol book.setName(name); ^ symbol: method setName(String) location: variable book of type Book C:\������\Ȱ��1\jpashop\src\test\java\jpabook\jpashop\service\OrderServiceTest.java:102: error: cannot find symbol book.setPrice(price); ^ symbol: method setPrice(int) location: variable book of type Book C:\������\Ȱ��1\jpashop\src\test\java\jpabook\jpashop\service\OrderServiceTest.java:103: error: cannot find symbol book.setStockQuantity(stockQuantity); ^ symbol: method setStockQuantity(int) location: variable book of type Book 8 errors FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':compileTestJava'. > Compilation failed; see the compiler error output for details. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 22s 3 actionable tasks: 2 executed, 1 up-to-date
- 0
- 3
- 549
질문&답변
2021.10.13
테스트 에러 문의 (Execution failed for task ':test'.)
동일한 에러가 발생했는데, Junit4에 관한 것을 추가하니 해결하였습니다. 혹시, 추가해주신 한줄이 어떤 기능인지 설명좀 부탁드려요
- 2
- 4
- 8.9K
질문&답변
2021.03.28
추가 오류가 발생
답변 감사드립니다. 답변주신대로 재실행했지만, 같은 오류가 나왔습니다. 이전에 댓글들 중 application.yml에서 MVCC=TRUE를 지우고 실행해보라고 했던것이 있어, 해당 문구를 지우고 실행하니 정상적으로 실행이 됐는데... MVCC가 있고 없고가 어떤 차이인가요?
- 0
- 3
- 139
질문&답변
2021.03.27
test실행이 되지 않아요
감사합니다!!!
- 0
- 4
- 203
질문&답변
2021.03.24
test실행이 되지 않아요
답변 감사합니다, 선생님. 보내주신 메일로 전체 코드 압축해서 보냈습니다. 어떻게 실행할 수 있는지도 알려주세요. 이 부분은 어떤 걸 물어보시는지 제가 잘 이해가 가질 않습니다. 어떤 프로그램으로 돌리는지를 물어보시는 건가요?
- 0
- 4
- 203
질문&답변
2021.02.24
DataSourceUtils import가 안 됩니다..
답변 감사합니다!!
- 0
- 3
- 1.5K