mardi 1 décembre 2015

Scalamock 3. Mock overloaded method without parameter

I couldn't find any documentation that explains how to mock overloaded methods that take no arguments in scalamock e.g

public boolean isInfoEnabled(Marker marker);
public boolean isInfoEnabled();

To mock the function that takes the Marker, one can simply use

(loggerMock.isInfoEnabled(_: Marker)).expects(*).returning(true)

But how to mock the other method that takes no parameters? Any help is appreciated.

Aucun commentaire:

Enregistrer un commentaire