File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
gwtmockito/src/main/java/com/google/gwtmockito/impl Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change 17
17
18
18
import com .google .gwt .core .client .JavaScriptObject ;
19
19
import com .google .gwt .dom .client .Element ;
20
+ import com .google .gwt .dom .client .InputElement ;
20
21
21
22
import org .mockito .internal .stubbing .defaultanswers .ReturnsMocks ;
22
23
import org .mockito .invocation .InvocationOnMock ;
@@ -42,6 +43,8 @@ public Object answer(InvocationOnMock invocation) throws Throwable {
42
43
} else if (invocation .getMock () instanceof Element && methodName .equals ("getTagName" )) {
43
44
String className = invocation .getMock ().getClass ().getSimpleName ();
44
45
return className .substring (0 , className .indexOf ("Element" )).toLowerCase ();
46
+ } else if (invocation .getMock () instanceof InputElement && methodName .equals ("getType" )) {
47
+ return "text" ;
45
48
} else {
46
49
return super .answer (invocation );
47
50
}
You can’t perform that action at this time.
0 commit comments