<?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: Mocking Static Calls Revisited</title>
	<atom:link href="http://blog.xebia.com/2007/06/22/mocking-static-calls-revisited/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.xebia.com/2007/06/22/mocking-static-calls-revisited/</link>
	<description>Software development done right!</description>
	<lastBuildDate>Wed, 08 Feb 2012 14:41:38 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Helgo Rongen</title>
		<link>http://blog.xebia.com/2007/06/22/mocking-static-calls-revisited/#comment-20842</link>
		<dc:creator>Helgo Rongen</dc:creator>
		<pubDate>Thu, 25 Oct 2007 12:35:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.xebia.com/2007/06/22/mocking-static-calls-revisited/#comment-20842</guid>
		<description>You guys should also take a look at the Apache Shale Framework. It has a Test module which includes mock objects for the FacesContext.

It works really well and all you have to do is implement the AbstractJsfTestCase from shale to get access to a (almost) fully mocked FacesContext.</description>
		<content:encoded><![CDATA[<p>You guys should also take a look at the Apache Shale Framework. It has a Test module which includes mock objects for the FacesContext.</p>
<p>It works really well and all you have to do is implement the AbstractJsfTestCase from shale to get access to a (almost) fully mocked FacesContext.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Meindert</title>
		<link>http://blog.xebia.com/2007/06/22/mocking-static-calls-revisited/#comment-16738</link>
		<dc:creator>Meindert</dc:creator>
		<pubDate>Tue, 11 Sep 2007 07:08:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.xebia.com/2007/06/22/mocking-static-calls-revisited/#comment-16738</guid>
		<description>I just read an article about a aspectJ based mocking framework that can mock private/protected and static methods/constructors: http://www.testdriven.com/modules/news/article.php?storyid=577
Maybe that is an option?</description>
		<content:encoded><![CDATA[<p>I just read an article about a aspectJ based mocking framework that can mock private/protected and static methods/constructors: <a href="http://www.testdriven.com/modules/news/article.php?storyid=577" rel="nofollow">http://www.testdriven.com/modules/news/article.php?storyid=577</a><br />
Maybe that is an option?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arnoud Wolfard</title>
		<link>http://blog.xebia.com/2007/06/22/mocking-static-calls-revisited/#comment-12174</link>
		<dc:creator>Arnoud Wolfard</dc:creator>
		<pubDate>Wed, 25 Jul 2007 13:03:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.xebia.com/2007/06/22/mocking-static-calls-revisited/#comment-12174</guid>
		<description>Nice solution. Based on your code I came up with the code below (now you are not required to implement the abstract methods):

public abstract class MockFacesContext extends FacesContext {
	
	public static void mockFacesContext(FacesContext facesContext) {
		FacesContext.setCurrentInstance(facesContext);
	}
}</description>
		<content:encoded><![CDATA[<p>Nice solution. Based on your code I came up with the code below (now you are not required to implement the abstract methods):</p>
<p>public abstract class MockFacesContext extends FacesContext {</p>
<p>	public static void mockFacesContext(FacesContext facesContext) {<br />
		FacesContext.setCurrentInstance(facesContext);<br />
	}<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lonneke</title>
		<link>http://blog.xebia.com/2007/06/22/mocking-static-calls-revisited/#comment-9989</link>
		<dc:creator>Lonneke</dc:creator>
		<pubDate>Sat, 23 Jun 2007 10:57:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.xebia.com/2007/06/22/mocking-static-calls-revisited/#comment-9989</guid>
		<description>I really like this solution. I agree with you that it is better not do adapt the code under test. Besides that, this solution is easy to understand for developers that need to maintain it.</description>
		<content:encoded><![CDATA[<p>I really like this solution. I agree with you that it is better not do adapt the code under test. Besides that, this solution is easy to understand for developers that need to maintain it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lars Vonk</title>
		<link>http://blog.xebia.com/2007/06/22/mocking-static-calls-revisited/#comment-9922</link>
		<dc:creator>Lars Vonk</dc:creator>
		<pubDate>Fri, 22 Jun 2007 10:55:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.xebia.com/2007/06/22/mocking-static-calls-revisited/#comment-9922</guid>
		<description>Good thinking Jeroen! It&#039;s an elegant solution, you only have to write the MockFacesContextWrapper once, and like you said the program is unware of Helpers etc. so I think we have a winner.
The issue, how to mock static calls, is still valid though. Not all static calls are implemented like FacesContext which allow for this implementation. But thanks to your blogs we can now choose from 5 different solutions :-).</description>
		<content:encoded><![CDATA[<p>Good thinking Jeroen! It&#8217;s an elegant solution, you only have to write the MockFacesContextWrapper once, and like you said the program is unware of Helpers etc. so I think we have a winner.<br />
The issue, how to mock static calls, is still valid though. Not all static calls are implemented like FacesContext which allow for this implementation. But thanks to your blogs we can now choose from 5 different solutions <img src='http://blog.xebia.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- This Quick Cache file was built for (  blog.xebia.com/2007/06/22/mocking-static-calls-revisited/feed/ ) in 0.49820 seconds, on Feb 9th, 2012 at 7:04 pm UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 9th, 2012 at 8:04 pm UTC -->
