<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: GWT Testing With Groovy? (Heck yeah!)</title>
	<atom:link href="http://pathfindersoftware.com/2007/12/gwt-testing-wit/feed/" rel="self" type="application/rss+xml" />
	<link>http://pathfindersoftware.com/2007/12/gwt-testing-wit/</link>
	<description>The Fastest Way to Launch Successful Software</description>
	<lastBuildDate>Thu, 19 Jan 2012 16:36:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Leonid</title>
		<link>http://pathfindersoftware.com/2007/12/gwt-testing-wit/#comment-7525</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-7525</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(&quot;button&quot;);
  }
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(&#8220;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>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic (User agent is rejected)
Page Caching using memcached (User agent is rejected)

Served from: pathfindersoftware.com @ 2012-02-09 23:22:58 -->
