jeudi 12 décembre 2019

How to test if a method is called on certain event Robolectric

I have a button if click it it will call sayhello() function

Button btn;

btn.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
        sayhello();
    }
});

New how to test in robolectric if sayhello() method is called or not?

Aucun commentaire:

Enregistrer un commentaire