질문&답변
기능테스트시, 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
- 조회수
- 682





