use of org.jmock.core.stub.ReturnStub in project intellij-plugins by JetBrains.
the class JabberTransport_ConnectionTest method createJabberUIMock.
private Mock createJabberUIMock() {
Mock mockUI = mock(JabberUI.class);
mockUI.stubs().method("connectAndLogin").will(new ReturnStub(Boolean.TRUE) {
@Override
public Object invoke(Invocation invocation) throws Throwable {
myFacade.connect();
return super.invoke(invocation);
}
});
return mockUI;
}
Aggregations