<?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: Poking Objective-C with a Testing Stick</title>
	<atom:link href="http://everburning.com/news/poking-objective-c-with-a-testing-stick/feed/" rel="self" type="application/rss+xml" />
	<link>http://everburning.com/news/poking-objective-c-with-a-testing-stick/</link>
	<description>picking at the fringes of reality</description>
	<lastBuildDate>Wed, 14 Jul 2010 13:06:02 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Benjamin</title>
		<link>http://everburning.com/news/poking-objective-c-with-a-testing-stick/comment-page-1/#comment-61644</link>
		<dc:creator>Benjamin</dc:creator>
		<pubDate>Wed, 18 Nov 2009 14:16:44 +0000</pubDate>
		<guid isPermaLink="false">http://everburning.com/?p=669#comment-61644</guid>
		<description>I tried to set up a mock object with a more complex method:

&lt;pre lang=&quot;c&quot;&gt;
id oauthControllerMock = [OCMockObject partialMockForObject:oauthController];
    [[[oauthControllerMock stub] andCall:@selector(fakeSendRequest:delegate:didFinishSelector:didFailSelector:)
                 onObject:self] sendRequest:[OCMArg any] 
									delegate:[OCMArg any] 
							didFinishSelector:[OCMArg anyPointer] 
							didFailSelector:[OCMArg anyPointer]];

The following method should be called:
- (void)fakeSendRequest:(OAMutableURLRequest *)aRequest 
			   delegate:(id)aDelegate 
	  didFinishSelector:(SEL)finishSelector 
		didFailSelector:(SEL)failSelector {
	NSLogDebug(@&quot;VZnetOAuthControllerTest fakeSendRequest&quot;);
       ...
}
&lt;/pre&gt;
When I call a method on oauthController that internally calls sendRequest... I end up with this error :(
Test Case &#039;-[VZnetOAuthControllerTest testGetRequestToken]&#039; started.
Unknown.m:0: error: -[VZnetOAuthControllerTest testGetRequestToken] : Ended up in subclass forwarder for VZnetOAuthController-0x12668a0-280246557.086898 with unstubbed method sendRequest:delegate:didFinishSelector:didFailSelector:
Test Case &#039;-[VZnetOAuthControllerTest testGetRequestToken]&#039; failed (0.001 seconds).

Can anybody help me?</description>
		<content:encoded><![CDATA[<p>I tried to set up a mock object with a more complex method:</p>
<pre lang="c">
id oauthControllerMock = [OCMockObject partialMockForObject:oauthController];
    [[[oauthControllerMock stub] andCall:@selector(fakeSendRequest:delegate:didFinishSelector:didFailSelector:)
                 onObject:self] sendRequest:[OCMArg any]
									delegate:[OCMArg any]
							didFinishSelector:[OCMArg anyPointer]
							didFailSelector:[OCMArg anyPointer]];

The following method should be called:
- (void)fakeSendRequest:(OAMutableURLRequest *)aRequest
			   delegate:(id)aDelegate
	  didFinishSelector:(SEL)finishSelector
		didFailSelector:(SEL)failSelector {
	NSLogDebug(@"VZnetOAuthControllerTest fakeSendRequest");
       ...
}
</pre>
<p>When I call a method on oauthController that internally calls sendRequest&#8230; I end up with this error :(<br />
Test Case &#8216;-[VZnetOAuthControllerTest testGetRequestToken]&#8216; started.<br />
Unknown.m:0: error: -[VZnetOAuthControllerTest testGetRequestToken] : Ended up in subclass forwarder for VZnetOAuthController-0x12668a0-280246557.086898 with unstubbed method sendRequest:delegate:didFinishSelector:didFailSelector:<br />
Test Case &#8216;-[VZnetOAuthControllerTest testGetRequestToken]&#8216; failed (0.001 seconds).</p>
<p>Can anybody help me?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luke Redpath</title>
		<link>http://everburning.com/news/poking-objective-c-with-a-testing-stick/comment-page-1/#comment-61582</link>
		<dc:creator>Luke Redpath</dc:creator>
		<pubDate>Thu, 05 Nov 2009 17:32:49 +0000</pubDate>
		<guid isPermaLink="false">http://everburning.com/?p=669#comment-61582</guid>
		<description>Thanks for the article. I was actually able to get this working without adding the copy files phase; I simply brought up the info for my UnitTests target and specified OCMock as a linked library.</description>
		<content:encoded><![CDATA[<p>Thanks for the article. I was actually able to get this working without adding the copy files phase; I simply brought up the info for my UnitTests target and specified OCMock as a linked library.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.262 seconds -->
