<@U7TJY2ZD3> Hi, I let you a comment on Github, I ...
# mockk
a
@oleksiyp Hi, I let you a comment on Github, I think we misunderstand each others. Please come back to me for a tchat, if you think this is easier.
o
Currently commuting home, dont have PC access. So can just answer general questions
Basically in the code in github I do not see usage of mDataManager
Please double check it
And point file/linenumber if I missed something
a
this is not a direct usage
o
Oh I see your mail
Ok
a
I use it via floatingActionButton.perform(click())
that trigger a listener in the activity
that perform the mDataManager.request....
class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) setSupportActionBar(toolbar) fab.setOnClickListener { view -> DataManager().requestWebService() } }
o
But arent you having new instance here?
If you need to declare each new instance a mock you need constrctor mock
Please check docs and I will join later this evening
a
yeak, that works now
I didn t know about mock constructor, but that just make sens when I think about it.
as I said, first time mocking instrument tests.... thank you very much
I will explain this in the github issue for others
o
Sure thanks