DaggerMock icon indicating copy to clipboard operation
DaggerMock copied to clipboard

Error at mock Repository

Open jstr14 opened this issue 7 years ago • 3 comments
trafficstars

Hello,

I'm trying to test my login and I have some problems. The repo that I use to login has a function with username and password params. In my test I mock the Login Repository but it doen't work. I don't know what is the problem. Can you help me please?

I create a example repo: https://github.com/jstr14/Testing the example is on scafolding branch My test is on LoginTest class

Thank you very much

jstr14 avatar Dec 21 '17 13:12 jstr14

Hi, the LoginTest seems to be empty in scafolding branch:

https://github.com/jstr14/Testing/blob/scafolding/app/src/androidTest/java/cat/helm/basearchitecture/LoginTest.kt

fabioCollini avatar Dec 22 '17 20:12 fabioCollini

Hello, I upload the correct LoginTest, thanks for your reply

jstr14 avatar Dec 27 '17 07:12 jstr14

Hi, I think it doesn't work because you are using dexopener but you haven't declared the test runner in your build.gradle file. You can find more info here: https://github.com/tmurakami/dexopener

fabioCollini avatar Dec 27 '17 07:12 fabioCollini