scala - Verify that a method was called using Mockito without specifying arguments -


using mockito, possible verify function called/not called using spy or mock, without giving actual arguments? example if have class or object:

class myclass{   def f(x : int) = x }  object myobject{   def f(x : int) = x } 

i want able like:

val my_class = mock[myclass] // causes method f of myclass called there one(my_class).f // doesn't give arguments  val my_object = spy(myobject) // causes method f of myobject called there one(my_object).f // doesn't give arguments 

i want verify method called, not received specific arguments. also, when checking function not called:

there no(my_object).f 

i don't want verify not called arguments, not called @ all.

is there way this?

you use mockito matchers specify want verify call made argument.

in case be

there 1 (my_object/my_class).f(any[int]) 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -