Yashwanth Potu
Yashwanth Potu

Reputation: 344

How to verify a method call with Enum Parameter using Mockito?

verify(email.create(xx.E));

Below is the Enum

public enum xx {

     A,B,C,D,E

    }

Let me know if there is a way verify if create Method is called with enum as a parameter

Upvotes: 2

Views: 1828

Answers (1)

Nkosi
Nkosi

Reputation: 247018

Move the method out

//verify method invocation.
verify(email).create(xx.E);

Reference Let's verify some behaviour!

Upvotes: 4

Related Questions