Class MockEditorDelegate<T>
java.lang.Object
com.google.gwt.editor.client.testing.MockEditorDelegate<T>
- Type Parameters:
T- the type being edited
- All Implemented Interfaces:
EditorDelegate<T>
A mock implementation of
EditorDelegate.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetPath()Returns a zero-length string or the last value passed tosetPath(java.lang.String).booleanisDirty()Returnsfalseor the last value passed tosetDirty(boolean).voidrecordError(String message, Object value, Object userData) No-op.voidsetDirty(boolean dirty) Records the value ofdirtywhich can be retrieved fromisDirty().voidControls the return value ofgetPath().Returns a no-op HandlerRegistration instance.
-
Constructor Details
-
MockEditorDelegate
public MockEditorDelegate()
-
-
Method Details
-
getPath
Returns a zero-length string or the last value passed tosetPath(java.lang.String).- Specified by:
getPathin interfaceEditorDelegate<T>- Returns:
- the path as a String
-
isDirty
public boolean isDirty()Returnsfalseor the last value passed tosetDirty(boolean). -
recordError
No-op.- Specified by:
recordErrorin interfaceEditorDelegate<T>- Parameters:
message- a textual description of the errorvalue- the value to be returned byEditorError.getValue()ornullif the value currently associated with the Editor should be useduserData- an arbitrary object, possiblynull, that can be retrieved withEditorError.getUserData()
-
setDirty
public void setDirty(boolean dirty) Records the value ofdirtywhich can be retrieved fromisDirty().- Specified by:
setDirtyin interfaceEditorDelegate<T>- Parameters:
dirty- the dirty state of the Editor
-
setPath
Controls the return value ofgetPath(). -
subscribe
Returns a no-op HandlerRegistration instance.- Specified by:
subscribein interfaceEditorDelegate<T>- Returns:
- a HandlerRegistration to unsubscribe from the notifications or
nullif the delegate does not support subscription
-