<?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/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
	>
<channel>
	<title>Comments on: Unit Testing: IoC/DI, Robotlegs and FlexUnit 4</title>
	<atom:link href="http://joelhooks.com/2009/07/21/unit-testing-with-inversion-of-control-ioc-and-dependency-injection-di-with-the-robotlegs-framework-and-flexunit-4/feed/" rel="self" type="application/rss+xml" />
	<link>http://joelhooks.com/2009/07/21/unit-testing-with-inversion-of-control-ioc-and-dependency-injection-di-with-the-robotlegs-framework-and-flexunit-4/</link>
	<description>if there's one thing I know about me and my thoughts: given enough time I'm always wrong</description>
	<lastBuildDate>Sun, 21 Feb 2010 09:03:04 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Nek</title>
		<link>http://joelhooks.com/2009/07/21/unit-testing-with-inversion-of-control-ioc-and-dependency-injection-di-with-the-robotlegs-framework-and-flexunit-4/comment-page-1/#comment-9374</link>
		<dc:creator>Nek</dc:creator>
		<pubDate>Mon, 28 Sep 2009 17:22:31 +0000</pubDate>
		<guid isPermaLink="false">http://joelhooks.com/?p=283#comment-9374</guid>
		<description>Flex 3 version of main.xml:&lt;br&gt;&lt;br&gt;&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;&lt;br&gt;&lt;mx:Application &lt;br&gt;    xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;&lt;br&gt;    xmlns:flexunit=&quot;flexunit.flexui.*&quot; &lt;br&gt;	xmlns:flexUnitUIRunner=&quot;http://www.adobe.com/2009/flexUnitUIRunner&quot;&lt;br&gt;    creationComplete=&quot;onCreationComplete()&quot;&lt;br&gt;&gt;    &lt;br&gt;    &lt;mx:Script&gt;&lt;br&gt;        &lt;![CDATA[&lt;br&gt;		import org.robotlegs.demos.imagegallery.test.suites.RobotlegsImageGalleryTestSuite;&lt;br&gt;&lt;br&gt;		import org.flexunit.listeners.UIListener;&lt;br&gt;		import org.flexunit.runner.FlexUnitCore;&lt;br&gt;		&lt;br&gt;		private var core:FlexUnitCore;&lt;br&gt;		private function onCreationComplete():void&lt;br&gt;		{	&lt;br&gt;			this.core = new FlexUnitCore();&lt;br&gt;			core.addListener( new UIListener( uiListener ));	&lt;br&gt;			core.run( RobotlegsImageGalleryTestSuite  )&lt;br&gt;		}&lt;br&gt;    ]]&gt;&lt;br&gt;    &lt;/mx:Script&gt;    &lt;br&gt;   &lt;flexUnitUIRunner:TestRunnerBase id=&quot;uiListener&quot; width=&quot;100%&quot; height=&quot;100%&quot;/&gt;&lt;br&gt;&lt;/mx:Application&gt;</description>
		<content:encoded><![CDATA[<p>Flex 3 version of main.xml:</p>
<p>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243;?&gt;<br />&lt;mx:Application <br />    xmlns:mx=&#8221;http://www.adobe.com/2006/mxml&#8221;<br />    xmlns:flexunit=&#8221;flexunit.flexui.*&#8221; <br />	xmlns:flexUnitUIRunner=&#8221;http://www.adobe.com/2009/flexUnitUIRunner&#8221;<br />    creationComplete=&#8221;onCreationComplete()&#8221;<br />&gt;    <br />    &lt;mx:Script&gt;<br />        &lt;![CDATA[<br />		import org.robotlegs.demos.imagegallery.test.suites.RobotlegsImageGalleryTestSuite;</p>
<p>		import org.flexunit.listeners.UIListener;<br />		import org.flexunit.runner.FlexUnitCore;</p>
<p>		private var core:FlexUnitCore;<br />		private function onCreationComplete():void<br />		{	<br />			this.core = new FlexUnitCore();<br />			core.addListener( new UIListener( uiListener ));	<br />			core.run( RobotlegsImageGalleryTestSuite  )<br />		}<br />    ]]&gt;<br />    &lt;/mx:Script&gt;    <br />   &lt;flexUnitUIRunner:TestRunnerBase id=&#8221;uiListener&#8221; width=&#8221;100%&#8221; height=&#8221;100%&#8221;/&gt;<br />&lt;/mx:Application&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joel Hooks</title>
		<link>http://joelhooks.com/2009/07/21/unit-testing-with-inversion-of-control-ioc-and-dependency-injection-di-with-the-robotlegs-framework-and-flexunit-4/comment-page-1/#comment-9373</link>
		<dc:creator>Joel Hooks</dc:creator>
		<pubDate>Mon, 28 Sep 2009 12:34:11 +0000</pubDate>
		<guid isPermaLink="false">http://joelhooks.com/?p=283#comment-9373</guid>
		<description>When testing classes that contain [Inject]-able properties, you manually inject the values in a test as needed. This allows you to substitute test implementations. When testing, we aren&#039;t trying to see if the automated DI works, we want to know the classes work independent of any external class, framework, or service.</description>
		<content:encoded><![CDATA[<p>When testing classes that contain [Inject]-able properties, you manually inject the values in a test as needed. This allows you to substitute test implementations. When testing, we aren&#39;t trying to see if the automated DI works, we want to know the classes work independent of any external class, framework, or service.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nek</title>
		<link>http://joelhooks.com/2009/07/21/unit-testing-with-inversion-of-control-ioc-and-dependency-injection-di-with-the-robotlegs-framework-and-flexunit-4/comment-page-1/#comment-9372</link>
		<dc:creator>Nek</dc:creator>
		<pubDate>Mon, 28 Sep 2009 11:29:15 +0000</pubDate>
		<guid isPermaLink="false">http://joelhooks.com/?p=283#comment-9372</guid>
		<description>That&#039;s nice but what about Mediators testing or anything else with [Inject]? &lt;br&gt;Or being more specific what is the best way to deal with dependencies of testee classes?&lt;br&gt;update: Trying ASMock. Looks nice so far.</description>
		<content:encoded><![CDATA[<p>That&#39;s nice but what about Mediators testing or anything else with [Inject]? <br />Or being more specific what is the best way to deal with dependencies of testee classes?<br />update: Trying ASMock. Looks nice so far.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shanon</title>
		<link>http://joelhooks.com/2009/07/21/unit-testing-with-inversion-of-control-ioc-and-dependency-injection-di-with-the-robotlegs-framework-and-flexunit-4/comment-page-1/#comment-9355</link>
		<dc:creator>Shanon</dc:creator>
		<pubDate>Wed, 12 Aug 2009 03:17:31 +0000</pubDate>
		<guid isPermaLink="false">http://joelhooks.com/?p=283#comment-9355</guid>
		<description>I&#039;m a little late to the party but nice post. I&#039;ve just started blogging on the topic of flex unit testing myself. The Flex community seems to be a way behind others in terms of knowledge and application of unit testing techniques.</description>
		<content:encoded><![CDATA[<p>I&#39;m a little late to the party but nice post. I&#39;ve just started blogging on the topic of flex unit testing myself. The Flex community seems to be a way behind others in terms of knowledge and application of unit testing techniques.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shaun</title>
		<link>http://joelhooks.com/2009/07/21/unit-testing-with-inversion-of-control-ioc-and-dependency-injection-di-with-the-robotlegs-framework-and-flexunit-4/comment-page-1/#comment-9301</link>
		<dc:creator>shaun</dc:creator>
		<pubDate>Tue, 21 Jul 2009 09:23:48 +0000</pubDate>
		<guid isPermaLink="false">http://joelhooks.com/?p=283#comment-9301</guid>
		<description>Nice one Joel!&lt;br&gt;&lt;br&gt;As the EventBroadcaster is a simple wrapper around the EventDispatcher, nulling and re-instantiating the broadcaster doesn&#039;t do much - ie, the EventDispatcher it wraps stays alive between tests, and the registered listeners will survive. I would recommend re-instantiating the EventDispatcher between tests. Something like:&lt;br&gt;&lt;br&gt;&lt;code&gt;&lt;br&gt;private var service:FlickrImageService;&lt;br&gt;private var serviceDispatcher:EventDispatcher;&lt;br&gt;&lt;br&gt;[Before]&lt;br&gt;public function setUp():void&lt;br&gt;{&lt;br&gt;	serviceDispatcher = new EventDispatcher();&lt;br&gt;	service = new FlickrImageService();&lt;br&gt;	service.eventBroadcaster = new EventBroadcaster(serviceDispatcher);&lt;br&gt;}&lt;br&gt;&lt;br&gt;[After]&lt;br&gt;public function tearDown():void&lt;br&gt;{&lt;br&gt;	service.eventBroadcaster = null;&lt;br&gt;	serviceDispatcher = null;&lt;br&gt;	service = null;&lt;br&gt;}&lt;br&gt;&lt;/code&gt;&lt;br&gt;&lt;br&gt;Not sure if that will mess about with the async stuff - but I don&#039;t think so.</description>
		<content:encoded><![CDATA[<p>Nice one Joel!</p>
<p>As the EventBroadcaster is a simple wrapper around the EventDispatcher, nulling and re-instantiating the broadcaster doesn&#39;t do much &#8211; ie, the EventDispatcher it wraps stays alive between tests, and the registered listeners will survive. I would recommend re-instantiating the EventDispatcher between tests. Something like:</p>
<p><code><br />private var service:FlickrImageService;<br />private var serviceDispatcher:EventDispatcher;</p>
<p>[Before]<br />public function setUp():void<br />{<br />	serviceDispatcher = new EventDispatcher();<br />	service = new FlickrImageService();<br />	service.eventBroadcaster = new EventBroadcaster(serviceDispatcher);<br />}</p>
<p>[After]<br />public function tearDown():void<br />{<br />	service.eventBroadcaster = null;<br />	serviceDispatcher = null;<br />	service = null;<br />}<br /></code></p>
<p>Not sure if that will mess about with the async stuff &#8211; but I don&#39;t think so.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
