[Spring /JUnit] Mock ๊ฐ์ฒด์™€ ์ฃผ์†Œ๊ฐ’ ๋น„๊ต ๋ฌธ์ œ - Argument(s) are different! : org.mockito.exceptions.verification.opentest4j.ArgumentsAreDifferent
ยท
Backend/Spring Boot
โ—๏ธ์—๋Ÿฌ ๋ฉ”์‹œ์ง€org.mockito.exceptions.verification.opentest4j.ArgumentsAreDifferent      ๐Ÿ’ป ๊ฐœ๋ฐœ ํ™˜๊ฒฝFramework : `Spring Boot 3.2.3`DB : `MySQL`(๋กœ์ปฌ), `H2`(ํ…Œ์ŠคํŠธ)Library : `JPA`, `QueryDSL 5.0.0`Test : `JUnit`     ๐Ÿ”Ž ์›์ธSpring์—์„œ Junit์œผ๋กœ Controller ๋‹จ์˜ ๊ฒŒ์‹œ๊ธ€ ์ˆ˜์ • ๊ธฐ๋Šฅ์„ ํ…Œ์ŠคํŠธํ•˜๋Š”๋ฐ, `verify()` ๋ถ€๋ถ„์—์„œ ๊ฒ€์ฆ์—๋Ÿฌ๊ฐ€ ๋‚ฌ๋‹ค.  @Nested @DisplayName("๊ตฌ์ธ ๊ฒŒ์‹œ๊ธ€ ์ˆ˜์ •") public class updateHiringPostTest { private Long postId; pr..
[Spring/JUnit] DataJpaTest์—์„œ JPAQueryFactory Bean ๋“ฑ๋ก ์—๋Ÿฌ : No qualifying bean of type 'com.querydsl.jpa.impl.JPAQueryFactory' available
ยท
Backend/Spring Boot
Spring์—์„œ JPA์™€ QueryDSL์„ ์‚ฌ์šฉํ•˜์—ฌ DB์—์„œ ๋ฐ์ดํ„ฐ๋ฅผ ์กฐํšŒํ•˜๊ณ  ์žˆ์—ˆ๋‹ค.๊ทธ๋ฆฌ๊ณ  Repository ํ…Œ์ŠคํŠธ๋ฅผ ์ง„ํ–‰ํ•˜๋Š”๋ฐ ์—๋Ÿฌ๊ฐ€ ๋‚ฌ๋‹ค.     ๐Ÿ’ป ๊ฐœ๋ฐœ ํ™˜๊ฒฝFramework : Spring Boot `3.2.3`DB : MySQL, H2Library : JPA, QueryDSL `5.0.0`Test : JUnit     โ—๏ธ์—๋Ÿฌ ๋ฉ”์‹œ์ง€Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'XXXCustomRepositoryImpl' defined in file [.../repository/XXXCustomRepositoryImpl.class]: Unsati..
[ํ”„๋กœ์ ํŠธ ํšŒ๊ณ ] 1์ฐจ ํ”„๋กœ์ ํŠธ๋ฅผ ๋งˆ์น˜๋ฉฐ
ยท
Project
์•ฝ 6~7์ฃผ ๊ฐ„ 2022.01.09 ~ 2022.02.17 + (~ 2022.02.22) ํŒ€ ํ”„๋กœ์ ํŠธ๋ฅผ ์ง„ํ–‰ํ–ˆ๋‹ค. (๊ธฐํš๋ถ€ํ„ฐ ๋ฐœํ‘œ๊นŒ์ง€ ๋‹ค ํฌํ•จ) ๊ฐœ๋ฐœํ•˜๋Ÿฌ ์˜จ 6๋ช…์ด์„œ ๊ธฐํš๋ถ€ํ„ฐ ๋””์ž์ธ, ์„ค๊ณ„, ๊ฐœ๋ฐœ, ๋ฐœํ‘œ๊นŒ์ง€ ๋‹ค ํ•ด์•ผ ๋ผ์„œ ํž˜๋“ค์—ˆ๊ณ  ๋นก๋นกํ•œ ์ผ์ •์ด์—ˆ๋‹ค.  ํ”„๋กœ์ ํŠธ๋ฅผ ํ•˜๋Š” ๋™์•ˆ ์—ฌ๋Ÿฌ ์ผ๋“ค์ด ์žˆ์—ˆ๊ณ  ํž˜๋“ค์—ˆ๋‹ค. ํ•˜์ง€๋งŒ ํ”„๋กœ์ ํŠธ๋ฅผ ๋ฌด์‚ฌํžˆ ๋งˆ์น˜๊ณ , ์ˆ˜์ƒ๊นŒ์ง€ ํ•˜๊ฒŒ ๋˜๋ฉฐ ์œ ์˜๋ฏธํ•œ ๊ฒฐ๊ณผ๋ฅผ ๋งŒ๋“ค์–ด ๋‚ธ ๊ฒƒ ๊ฐ™์•„ ๋ฟŒ๋“ฏํ•˜๋‹ค.  ์ •์‹ ์—†์ด ๊ฐœ๋ฐœํ•˜๋Š๋ผ ์ค‘๊ฐ„์ค‘๊ฐ„ ๊ธฐ๋ก์„ ํ•˜์ง€ ๋ชปํ–ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ํ”„๋กœ์ ํŠธ ๋๋‚˜๊ณ  ํž˜๋“ค์—ˆ๋˜ ์ ์ด๋‚˜ ์•„์‰ฌ์› ๋˜ ์ ๋“ค์ด ๋ง๊ฐ๋˜๊ธฐ ์‹œ์ž‘ํ•œ๋‹ค. ๊ทธ๋ž˜์„œ ์žŠ์–ด๋ฒ„๋ฆฌ๊ธฐ ์ „์— ์ง€๋‚œ 6~7์ฃผ ๊ฐ„์˜ ํ”„๋กœ์ ํŠธ ๊ณผ์ •์„ ๋Œ์•„๋ณด๊ณ ์ž ํ•œ๋‹ค.     ๐Ÿ“ข ํ”„๋กœ์ ํŠธ ์†Œ๊ฐœํ”„๋กœ์ ํŠธ ์ธ์› : 6๋ช… (ํ”„๋ก ํŠธ์—”๋“œ 3๋ช…, ๋ฐฑ์—”๋“œ 3๋ช… (๋ฐฑ์—”๋“œ 1๋ช…์ด ์ธํ”„๋ผ๋„..
giraffe_
'์Šคํ”„๋ง' ํƒœ๊ทธ์˜ ๊ธ€ ๋ชฉ๋ก