We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kotest와 Mockk를 사용해 테스트 코드를 작성하려 했습니다. 빠르게 테스트 코드를 작성하고 실행을 해보았는데....
디스패처 에러와 데이터베이스와 연결이 안 되었다고 합니다.
문제의 원인은 UseCase를 호출할 때 사용된 dbQuery 함수때문이였습니다.
dbQuery
트랜잭션을 호출해 TransactionManager에 접근됩니다.
TransactionManager
dbQuery 인자를 꺼내야 하는 상황에서 다행히 Mockk 함수인 firstArg로 가져올 수 있었습니다.
firstArg
Transaction을 Mock으로 바꿔친 후 실행 로직을 dbQuery밖으로 꺼내오는 동작
The text was updated successfully, but these errors were encountered:
khcho0125
No branches or pull requests
Kotest와 Mockk를 사용해 테스트 코드를 작성하려 했습니다.
빠르게 테스트 코드를 작성하고 실행을 해보았는데....
문제의 원인은 UseCase를 호출할 때 사용된
dbQuery
함수때문이였습니다.dbQuery 인자를 꺼내야 하는 상황에서 다행히 Mockk 함수인
firstArg
로 가져올 수 있었습니다.The text was updated successfully, but these errors were encountered: