mercredi 5 décembre 2018

How to mock a declared private field?

How would I go about mocking Person?

class Test {
    private Person person;
    ...
    public void testMethod() {
        person.someMethod();
        ...
    }
}

Aucun commentaire:

Enregistrer un commentaire