<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: GWT Testing With Groovy? (Heck yeah!)</title>
	<atom:link href="http://www.pathf.com/blogs/2007/12/gwt-testing-wit/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pathf.com/blogs/2007/12/gwt-testing-wit/</link>
	<description>Running commentary about agile development, user experience design and Ajax.</description>
	<pubDate>Fri, 05 Dec 2008 17:34:26 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Leonid</title>
		<link>http://www.pathf.com/blogs/2007/12/gwt-testing-wit/#comment-2119</link>
		<dc:creator>Leonid</dc:creator>
		<pubDate>Thu, 19 Jun 2008 17:32:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=138#comment-2119</guid>
		<description>Hi Ivan,

This approach is great and mocking GWT class is brilliant idea.

Unfortunately this does not work with GWT 1.5 .

The problem is that in GWT 1.5 some inner mechanism to create Element objects has changed.
For example in GWT 1.4 the method of DOM class to create Button was like this:
  public static Element createButton() {
    return impl.createElement("button");
  }
So mocking of DOMImpl class is sufficient in this case.
But in GWT 1.5 we have something like:
  public static Element createButton() {
    return Document.get().createButtonElement().cast();
  }

Here get() method of Document class is a native method and it seems like it is not possible to mock it (at least I was not able to do this):
  public static native Document get() /*-{
    return $doc;
  }-*/;

Does it mean that this approach is not possible to use with GWT 1.5 or may be some workaround exists?

Thanks in advance,
Leonid</description>
		<content:encoded><![CDATA[<p>Hi Ivan,</p>
<p>This approach is great and mocking GWT class is brilliant idea.</p>
<p>Unfortunately this does not work with GWT 1.5 .</p>
<p>The problem is that in GWT 1.5 some inner mechanism to create Element objects has changed.<br />
For example in GWT 1.4 the method of DOM class to create Button was like this:<br />
  public static Element createButton() {<br />
    return impl.createElement(&#8221;button&#8221;);<br />
  }<br />
So mocking of DOMImpl class is sufficient in this case.<br />
But in GWT 1.5 we have something like:<br />
  public static Element createButton() {<br />
    return Document.get().createButtonElement().cast();<br />
  }</p>
<p>Here get() method of Document class is a native method and it seems like it is not possible to mock it (at least I was not able to do this):<br />
  public static native Document get() /*-{<br />
    return $doc;<br />
  }-*/;</p>
<p>Does it mean that this approach is not possible to use with GWT 1.5 or may be some workaround exists?</p>
<p>Thanks in advance,<br />
Leonid</p>
]]></content:encoded>
	</item>
</channel>
</rss>
