public class

MockRequestFactoryEditorDriver

extends Object
implements RequestFactoryEditorDriver<P, E extends Editor<? super P>>
java.lang.Object
   ↳ com.google.gwt.requestfactory.client.testing.MockRequestFactoryEditorDriver<P, E extends com.google.gwt.editor.client.Editor<P>>

Class Overview

A no-op implementation of RequestFactoryEditorDriver that records its inputs.

Summary

Public Constructors
MockRequestFactoryEditorDriver()
Public Methods
void display(P proxy)
Records its arguments.
void edit(P proxy, RequestContext saveRequest)
Records its arguments.
RequestContext flush()
Returns null or the last value recorded.
E getEditor()
Returns null or the last value recorded.
List<EditorError> getErrors()
Returns an empty list.
EventBus getEventBus()
Returns null or the last value recorded.
String[] getPaths()
Returns a zero-length array.
P getProxy()
Returns null or the last value recorded.
RequestFactory getRequestFactory()
Returns null or the last value recorded.
RequestContext getSaveRequest()
Returns null or the last value recorded.
boolean hasErrors()
Returns false.
void initialize(E editor)
Initializes a driver that will not be able to support subscriptions.
void initialize(EventBus eventBus, RequestFactory requestFactory, E editor)
Records its arguments.
void initialize(RequestFactory requestFactory, E editor)
Initializes a driver with the editor it will run, and a RequestFactory to use for subscription services.
boolean setViolations(Iterable<Violation> errors)
A no-op method that always returns false.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.google.gwt.requestfactory.client.RequestFactoryEditorDriver

Public Constructors

public MockRequestFactoryEditorDriver ()

Public Methods

public void display (P proxy)

Records its arguments.

Parameters
proxy a Proxy of type P

public void edit (P proxy, RequestContext saveRequest)

Records its arguments.

Parameters
proxy the proxy to be edited
saveRequest the request context that will accumulate edits and is returned form flush()

public RequestContext flush ()

Returns null or the last value recorded.

Returns

public E getEditor ()

Returns null or the last value recorded.

public List<EditorError> getErrors ()

Returns an empty list.

Returns

public EventBus getEventBus ()

Returns null or the last value recorded.

public String[] getPaths ()

Returns a zero-length array.

Returns
  • an array of Strings

public P getProxy ()

Returns null or the last value recorded.

public RequestFactory getRequestFactory ()

Returns null or the last value recorded.

public RequestContext getSaveRequest ()

Returns null or the last value recorded.

public boolean hasErrors ()

Returns false.

Returns
  • true if errors are present

public void initialize (E editor)

Initializes a driver that will not be able to support subscriptions. Calls to subscribe() will do nothing.

Parameters
editor an Editor of type E

public void initialize (EventBus eventBus, RequestFactory requestFactory, E editor)

Records its arguments.

Parameters
eventBus the EventBus
requestFactory a RequestFactory instance
editor an Editor of type E

public void initialize (RequestFactory requestFactory, E editor)

Initializes a driver with the editor it will run, and a RequestFactory to use for subscription services.

Parameters
requestFactory a RequestFactory instance
editor an Editor of type E

public boolean setViolations (Iterable<Violation> errors)

A no-op method that always returns false.

Parameters
errors a Iterable over Violation instances
Returns
  • true if there were any unconsumed EditorErrors which can be retrieved from getErrors()