<?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: TDD: Helper for checking PropertyChanged event gets raised</title>
	<atom:link href="http://richarddingwall.name/2009/05/11/tdd-helper-for-checking-propertychanged-event-gets-raised/feed/" rel="self" type="application/rss+xml" />
	<link>http://richarddingwall.name/2009/05/11/tdd-helper-for-checking-propertychanged-event-gets-raised/</link>
	<description>The adventures of a young kiwi software developer in London</description>
	<lastBuildDate>Thu, 10 May 2012 16:20:46 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Drew Freyling</title>
		<link>http://richarddingwall.name/2009/05/11/tdd-helper-for-checking-propertychanged-event-gets-raised/comment-page-1/#comment-10391</link>
		<dc:creator>Drew Freyling</dc:creator>
		<pubDate>Fri, 25 Sep 2009 05:53:58 +0000</pubDate>
		<guid isPermaLink="false">http://richarddingwall.name/?p=1355#comment-10391</guid>
		<description>Yeah but you are only making your assertion in the dispose of your event listener. So your test while it will pass, won&#039;t make the assertion unless you dispose of it in your test.</description>
		<content:encoded><![CDATA[<p>Yeah but you are only making your assertion in the dispose of your event listener. So your test while it will pass, won&#8217;t make the assertion unless you dispose of it in your test.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard</title>
		<link>http://richarddingwall.name/2009/05/11/tdd-helper-for-checking-propertychanged-event-gets-raised/comment-page-1/#comment-9723</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Wed, 09 Sep 2009 00:59:09 +0000</pubDate>
		<guid isPermaLink="false">http://richarddingwall.name/?p=1355#comment-9723</guid>
		<description>Drew: our app used the WPF MVVM toolkit; view models inherit ViewModelBase which isn&#039;t IDisposable..?</description>
		<content:encoded><![CDATA[<p>Drew: our app used the WPF MVVM toolkit; view models inherit ViewModelBase which isn&#8217;t IDisposable..?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Drew Freyling</title>
		<link>http://richarddingwall.name/2009/05/11/tdd-helper-for-checking-propertychanged-event-gets-raised/comment-page-1/#comment-9694</link>
		<dc:creator>Drew Freyling</dc:creator>
		<pubDate>Tue, 08 Sep 2009 08:39:30 +0000</pubDate>
		<guid isPermaLink="false">http://richarddingwall.name/?p=1355#comment-9694</guid>
		<description>Ah. The viewmodel must also implement idisposable which would then in turn dispose of the event listener and make the assertion. For example:

using (var viewModel = new ViewModel()) {
  viewModel.AssertRaisesPropertyChangedFor(&quot;PackPath&quot;);
   viewModel.OnFileSelected(@&quot;C:\foo.zip&quot;);
}</description>
		<content:encoded><![CDATA[<p>Ah. The viewmodel must also implement idisposable which would then in turn dispose of the event listener and make the assertion. For example:</p>
<p>using (var viewModel = new ViewModel()) {<br />
  viewModel.AssertRaisesPropertyChangedFor(&#8220;PackPath&#8221;);<br />
   viewModel.OnFileSelected(@&#8221;C:\foo.zip&#8221;);<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard</title>
		<link>http://richarddingwall.name/2009/05/11/tdd-helper-for-checking-propertychanged-event-gets-raised/comment-page-1/#comment-9183</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Wed, 26 Aug 2009 02:06:31 +0000</pubDate>
		<guid isPermaLink="false">http://richarddingwall.name/?p=1355#comment-9183</guid>
		<description>Drew,

It worked on my machine, I promise!! Perhaps the dispose/finalizer needs to be tweaked for your environment/test runner?</description>
		<content:encoded><![CDATA[<p>Drew,</p>
<p>It worked on my machine, I promise!! Perhaps the dispose/finalizer needs to be tweaked for your environment/test runner?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Drew Freyling</title>
		<link>http://richarddingwall.name/2009/05/11/tdd-helper-for-checking-propertychanged-event-gets-raised/comment-page-1/#comment-8984</link>
		<dc:creator>Drew Freyling</dc:creator>
		<pubDate>Wed, 19 Aug 2009 23:29:32 +0000</pubDate>
		<guid isPermaLink="false">http://richarddingwall.name/?p=1355#comment-8984</guid>
		<description>Are you sure this works? when i run the test it keeps hitting the finalize and never the dispose, therefore never making the assertion.</description>
		<content:encoded><![CDATA[<p>Are you sure this works? when i run the test it keeps hitting the finalize and never the dispose, therefore never making the assertion.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard</title>
		<link>http://richarddingwall.name/2009/05/11/tdd-helper-for-checking-propertychanged-event-gets-raised/comment-page-1/#comment-4940</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Thu, 21 May 2009 10:58:08 +0000</pubDate>
		<guid isPermaLink="false">http://richarddingwall.name/?p=1355#comment-4940</guid>
		<description>@Beau: I got sick of typing that over and over again :)</description>
		<content:encoded><![CDATA[<p>@Beau: I got sick of typing that over and over again :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Beau Crawford</title>
		<link>http://richarddingwall.name/2009/05/11/tdd-helper-for-checking-propertychanged-event-gets-raised/comment-page-1/#comment-4502</link>
		<dc:creator>Beau Crawford</dc:creator>
		<pubDate>Mon, 11 May 2009 14:19:15 +0000</pubDate>
		<guid isPermaLink="false">http://richarddingwall.name/?p=1355#comment-4502</guid>
		<description>I use the following for testing events:

bool wasCalled = false;
viewModel.PropertyChanged += (s, e) =&gt; { wasCalled = true; }

// Invoke action that raises event

Assert.IsTrue(wasCalled);</description>
		<content:encoded><![CDATA[<p>I use the following for testing events:</p>
<p>bool wasCalled = false;<br />
viewModel.PropertyChanged += (s, e) =&gt; { wasCalled = true; }</p>
<p>// Invoke action that raises event</p>
<p>Assert.IsTrue(wasCalled);</p>
]]></content:encoded>
	</item>
</channel>
</rss>

