vendredi 20 octobre 2017

How to set a message for Verifications in JMockit

In the tested method a function should be called the predefined number of times:

    TestedClass.testedMethod();
    new Verifications() {
        @Mocked GridPrincipal principal;
        { principal.getWrappedPrincipal(); times = repetitions; }
    };

How can I set the message to be output if the verification fails? If it can obtain the real number of times and the number of times that had to happen, it would be even better.

Aucun commentaire:

Enregistrer un commentaire