<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-4863981320393275450.post487935112314420038..comments</id><updated>2008-07-31T08:00:06.504+03:00</updated><category term='teamwork'/><category term='Visual Studio'/><category term='SharePoint Saturday'/><category term='funny'/><category term='bugs'/><category term='HowTo'/><category term='Ivonna'/><category term='Lint'/><category term='Berlin'/><category term='dotnetPro'/><category term='MSTest'/><category term='Uncle Bob Martin'/><category term='Roy Osherove'/><category term='Microsoft SharePoint'/><category term='KCDC 2010'/><category term='LIDNUG'/><category term='TDD'/><category term='Other'/><category term='Test Lint'/><category term='AAA'/><category term='Isolator++'/><category term='developer'/><category term='Events'/><category term='Typemock Academy'/><category term='See# Party'/><category term='NUnit'/><category term='dotnet Cologne 2010'/><category term='Nova CodeCamp'/><category term='Test Driven Development'/><category term='event sponsorship'/><category term='CRM'/><category term='QA'/><category term='Andreas Aschauer'/><category term='unit testing ASP.NET'/><category term='Design'/><category term='linkedIn'/><category term='Basics'/><category term='Extensions'/><category term='Challenge'/><category term='Webcast'/><category term='legacy code'/><category term='Britt King'/><category term='Poll'/><category term='beta'/><category term='DDFranken2010'/><category term='TeamMate'/><category term='brownfield projects'/><category term='Advanced'/><category term='tutorials'/><category term='build'/><category term='Agile'/><category term='clean code'/><category term='IDD'/><category term='unit testing'/><category term='asp.net'/><category term='testing'/><category term='Methodology'/><category term='&quot;Dror B Helper&quot;'/><category term='.NET'/><category term='Summer Sale'/><category term='Twitter'/><category term='slides'/><category term='Codecamp'/><category term='SilverLight'/><category term='Code Camp'/><category term='Intellitest'/><category term='Philosophy'/><category term='Visual Basic.NET'/><category term='&quot;online session&quot;'/><category term='CThru'/><category term='Microsoft Steve Ballmer'/><category term='SharePoint&#x9;Unit testunit testing'/><category term='Programming'/><category term='C++'/><category term='Community Day'/><category term='Support'/><category term='beginners'/><category term='Multi Threading'/><category term='ty'/><category term='Unit test'/><category term='Software'/><category term='typemock'/><category term='Advanced Developers Conference'/><category term='NDC 2010'/><category term='Office (VSTO)'/><category term='Facebook'/><category term='NWATechFest'/><category term='Isolation'/><category term='user groups'/><category term='Licensing'/><category term='Google Wave'/><category term='OpenXML'/><category term='Webinar'/><category term='SharePoint'/><category term='ALT.NET'/><category term='Richard Fennell'/><category term='videos'/><category term='Isolator'/><category term='VB'/><category term='Cool Tools'/><category term='Announcements'/><category term='Racer'/><category term='Told You So'/><category term='C#'/><category term='Tech Days'/><category term='devLink'/><category term='WCF'/><category term='Stefan Leiser'/><category term='Releases'/><category term='Linux'/><category term='WPF'/><category term='Concurrent'/><category term='Tips and Tricks'/><category term='gil zilberfeld'/><title type='text'>Comments on The Typemock Insider Blog: Preview and Questions on the next Isolator API</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.typemock.com/feeds/487935112314420038/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4863981320393275450/487935112314420038/comments/default'/><link rel='alternate' type='text/html' href='http://blog.typemock.com/2008/07/preview-and-questions-on-next-isolator.html'/><author><name>Sarit Rosenthal-Aviram</name><uri>http://www.blogger.com/profile/04647991154558467187</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4863981320393275450.post-3555608639976642590</id><published>2008-07-31T08:00:00.000+03:00</published><updated>2008-07-31T08:00:00.000+03:00</updated><title type='text'>Tim,&lt;br&gt;&lt;br&gt;The empty parentheses are Lambda notat...</title><content type='html'>Tim,&lt;BR/&gt;&lt;BR/&gt;The empty parentheses are Lambda notation for delegates.&lt;BR/&gt;&lt;BR/&gt;What do you mean by Too intuitive?&lt;BR/&gt;&lt;BR/&gt;Gil</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4863981320393275450/487935112314420038/comments/default/3555608639976642590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4863981320393275450/487935112314420038/comments/default/3555608639976642590'/><link rel='alternate' type='text/html' href='http://blog.typemock.com/2008/07/preview-and-questions-on-next-isolator.html?showComment=1217480400000#c3555608639976642590' title=''/><author><name>Gil Zilberfeld</name><uri>http://www.blogger.com/profile/18210181375618736629</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.typemock.com/2008/07/preview-and-questions-on-next-isolator.html' ref='tag:blogger.com,1999:blog-4863981320393275450.post-487935112314420038' source='http://www.blogger.com/feeds/4863981320393275450/posts/default/487935112314420038' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1368629646'/></entry><entry><id>tag:blogger.com,1999:blog-4863981320393275450.post-1185567917005317030</id><published>2008-07-31T05:50:00.000+03:00</published><updated>2008-07-31T05:50:00.000+03:00</updated><title type='text'>What is the empty parens syntax being shown with i...</title><content type='html'>What is the empty parens syntax being shown with in the new API methods?&lt;BR/&gt;&lt;BR/&gt;That does seem too intuitive to me.&lt;BR/&gt;&lt;BR/&gt;Also, I&amp;#39;d like to agree on the &amp;quot;MyTest&amp;quot; and say I like &amp;quot;Isolator&amp;quot;.&lt;BR/&gt;&lt;BR/&gt;e.g. MyTest.Static.WhenCalled(  () =&amp;gt; Logger.Log )</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4863981320393275450/487935112314420038/comments/default/1185567917005317030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4863981320393275450/487935112314420038/comments/default/1185567917005317030'/><link rel='alternate' type='text/html' href='http://blog.typemock.com/2008/07/preview-and-questions-on-next-isolator.html?showComment=1217472600000#c1185567917005317030' title=''/><author><name>Tim Bassett</name><uri>http://www.blogger.com/profile/11458998395845680284</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.typemock.com/2008/07/preview-and-questions-on-next-isolator.html' ref='tag:blogger.com,1999:blog-4863981320393275450.post-487935112314420038' source='http://www.blogger.com/feeds/4863981320393275450/posts/default/487935112314420038' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-290975290'/></entry><entry><id>tag:blogger.com,1999:blog-4863981320393275450.post-7936371905986014254</id><published>2008-07-28T02:47:00.000+03:00</published><updated>2008-07-28T02:47:00.000+03:00</updated><title type='text'>I also don’t like MyTest. I’m writing my test and ...</title><content type='html'>I also don’t like MyTest. I’m writing my test and having something called MyTest is just confusing. My first thought was also Isolator, but anything better than MyTest would be welcome.&lt;BR/&gt;&lt;BR/&gt;I share Travis’ concern about the old API going away. I wouldn’t mind if the new API would be a new system and we could use both in the same test run, even if only one could be used in each test.&lt;BR/&gt;&lt;BR/&gt;I’ve suggested in the past the use of expression trees in reflective mocks, but what I really like are the natural mocks.&lt;BR/&gt;&lt;BR/&gt;I make extensive use of MSTest helpers to access non public members and it works fine with natural mocks most of the times. I only use reflective mocks when, for some reason, I can’t use natural mocks.&lt;BR/&gt;&lt;BR/&gt;I would also like to be able to create derived classes and add attributes and implicit and explicit interface implementation:&lt;BR/&gt;&lt;BR/&gt; Isolator.FakeDerived.Instance[ILogger]().Implments[ISerializable](InterfaceImplementatio.Explicit).WithAttribute(new SerializableAttribute());</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4863981320393275450/487935112314420038/comments/default/7936371905986014254'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4863981320393275450/487935112314420038/comments/default/7936371905986014254'/><link rel='alternate' type='text/html' href='http://blog.typemock.com/2008/07/preview-and-questions-on-next-isolator.html?showComment=1217202420000#c7936371905986014254' title=''/><author><name>Paulo Morgado</name><uri>http://paulomorgado.net/</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.typemock.com/2008/07/preview-and-questions-on-next-isolator.html' ref='tag:blogger.com,1999:blog-4863981320393275450.post-487935112314420038' source='http://www.blogger.com/feeds/4863981320393275450/posts/default/487935112314420038' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-976015097'/></entry><entry><id>tag:blogger.com,1999:blog-4863981320393275450.post-8384936383026690163</id><published>2008-07-25T07:22:00.000+03:00</published><updated>2008-07-25T07:22:00.000+03:00</updated><title type='text'>you went overboard w/ the MyTest.Something.RealMet...</title><content type='html'>you went overboard w/ the MyTest.Something.RealMethod, get rid of the Something for most things.   &lt;BR/&gt;&lt;BR/&gt;I don't get #8, I assume you mean log.Log not real.Log. That said, why do I have to "Fake" it first? That's a wasteful line. &lt;BR/&gt;&lt;BR/&gt;why do I have a separate API for stubbing different things? Just make one that can stub everything. takes string or delegate &lt;BR/&gt;&lt;BR/&gt;I don't like WhenCalled/WillReturn, tries to hard to be english and fails at that. Just call it Stub/Returns/Throws &lt;BR/&gt;&lt;BR/&gt;MyTest is really bad, call it Isolator or something like everyone suggested</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4863981320393275450/487935112314420038/comments/default/8384936383026690163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4863981320393275450/487935112314420038/comments/default/8384936383026690163'/><link rel='alternate' type='text/html' href='http://blog.typemock.com/2008/07/preview-and-questions-on-next-isolator.html?showComment=1216959720000#c8384936383026690163' title=''/><author><name>Aaron Jensen</name><uri>http://aaron.codebetter.com</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.typemock.com/2008/07/preview-and-questions-on-next-isolator.html' ref='tag:blogger.com,1999:blog-4863981320393275450.post-487935112314420038' source='http://www.blogger.com/feeds/4863981320393275450/posts/default/487935112314420038' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-30517896'/></entry><entry><id>tag:blogger.com,1999:blog-4863981320393275450.post-7079482757693630098</id><published>2008-07-24T22:31:00.000+03:00</published><updated>2008-07-24T22:31:00.000+03:00</updated><title type='text'>+1 on renaming &amp;quot;MyTest&amp;quot; to something lik...</title><content type='html'>+1 on renaming &amp;quot;MyTest&amp;quot; to something like &amp;quot;Isolator&amp;quot;. Also, the syntax here is not exactly pretty - how about this:&lt;BR/&gt;&lt;BR/&gt;Mock Creation:&lt;BR/&gt;&lt;BR/&gt;var mock = Isolator.Mock&amp;lt;ICommand&amp;gt;();&lt;BR/&gt;&lt;BR/&gt;Public Instance Method:&lt;BR/&gt;&lt;BR/&gt;Isolator.Expect(() =&amp;gt; mock.Execute()).Returns(2);&lt;BR/&gt;&lt;BR/&gt;Static Public Method:&lt;BR/&gt;&lt;BR/&gt;Isolator.Expect(() =&amp;gt; MyService.StaticMethod()).Returns(2);&lt;BR/&gt;&lt;BR/&gt;Non-Public Instance Method:&lt;BR/&gt;&lt;BR/&gt;Isolator.Expect(() =&amp;gt; mock.NonPublicMethod(“MyPrivateMethod”)).Returns(2);&lt;BR/&gt;&lt;BR/&gt;Public Members:&lt;BR/&gt;&lt;BR/&gt;Isolator.Expect(() =&amp;gt; mock.Name).Returns(“Bob”);&lt;BR/&gt;&lt;BR/&gt;Non-Public Members:&lt;BR/&gt;&lt;BR/&gt;Isolator.Expect(() =&amp;gt; mock.NonPublicMember(&amp;quot;_name&amp;quot;)).Returns(“Bob”);</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4863981320393275450/487935112314420038/comments/default/7079482757693630098'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4863981320393275450/487935112314420038/comments/default/7079482757693630098'/><link rel='alternate' type='text/html' href='http://blog.typemock.com/2008/07/preview-and-questions-on-next-isolator.html?showComment=1216927860000#c7079482757693630098' title=''/><author><name>matt</name><uri>http://mattburton.myopenid.com/</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/openid16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.typemock.com/2008/07/preview-and-questions-on-next-isolator.html' ref='tag:blogger.com,1999:blog-4863981320393275450.post-487935112314420038' source='http://www.blogger.com/feeds/4863981320393275450/posts/default/487935112314420038' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-2101268303'/></entry><entry><id>tag:blogger.com,1999:blog-4863981320393275450.post-1290456048972297270</id><published>2008-07-24T22:26:00.000+03:00</published><updated>2008-07-24T22:26:00.000+03:00</updated><title type='text'>In general I liked the record model of TypeMock, h...</title><content type='html'>In general I liked the record model of TypeMock, however it did cause problems with stubbing.  You&amp;#39;d have to set VerifyMode to pass if not called, and then have to set it back for your expectations.  It would be great if you could do another block in the test setup for stubbing and then have an expectation block for each individual test.  Otherwise much of the stubbing has to be repeated.  &lt;BR/&gt;&lt;BR/&gt;In general I don&amp;#39;t like having to always put:  recorder.ExpectAndReturn(person.Name, &amp;quot;Bob&amp;quot;).Always() or MyTest.Blah().Blah().Whenever()&lt;BR/&gt;around all my code, which is why I liked the recorder.  It would be very nice if stubbing were made first class and separate from expectations and be able to control the default repeat&lt;BR/&gt;recorder.StubMode = StubMode.AlwaysReturn;&lt;BR/&gt;recorder.Return(person.Name)&lt;BR/&gt;&lt;BR/&gt;Or, even better:&lt;BR/&gt;&lt;BR/&gt;For a recording stub block, make property assignments really mean that they will return what&amp;#39;s assigned, kind of like a list initializer in C#:&lt;BR/&gt;&lt;BR/&gt;Person person = Recorder.CreateMock  &amp;lt;Person&amp;gt;();&lt;BR/&gt;&lt;BR/&gt;using (StubRecorder stubber = Recorder.CreateStubRecorder)&lt;BR/&gt;{&lt;BR/&gt;   person.Name = &amp;quot;Bob&amp;quot;;&lt;BR/&gt;   person.Age = 3;&lt;BR/&gt;   person.CalculateSomething();&lt;BR/&gt;   stubber.Return(7);&lt;BR/&gt;}&lt;BR/&gt;&lt;BR/&gt;The propeerty assignements in the above block specify the return values.  For methods, the standard recorder.Return() would suffice.&lt;BR/&gt;&lt;BR/&gt;That way the syntax is nice, and way less noise of having to put MyTest.Expect.Always() around everything.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4863981320393275450/487935112314420038/comments/default/1290456048972297270'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4863981320393275450/487935112314420038/comments/default/1290456048972297270'/><link rel='alternate' type='text/html' href='http://blog.typemock.com/2008/07/preview-and-questions-on-next-isolator.html?showComment=1216927560000#c1290456048972297270' title=''/><author><name>Andrew Kutruff</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.typemock.com/2008/07/preview-and-questions-on-next-isolator.html' ref='tag:blogger.com,1999:blog-4863981320393275450.post-487935112314420038' source='http://www.blogger.com/feeds/4863981320393275450/posts/default/487935112314420038' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-262077249'/></entry><entry><id>tag:blogger.com,1999:blog-4863981320393275450.post-5430518781794556677</id><published>2008-07-24T19:03:00.000+03:00</published><updated>2008-07-24T19:03:00.000+03:00</updated><title type='text'>"MyTest" just feels like it's something that you u...</title><content type='html'>"MyTest" just feels like it's something that you use when you're posting an example code snippet and you're talking about your unit test or test fixture. Sort of like "MyClass" or "Foo." Maybe have a "Typemock" object or an "Isolator" object - Isolator.WhenCalled(...). That way I'd know that I'm acting on a fake/stub/mock thing and not on the test or test fixture.&lt;BR/&gt;&lt;BR/&gt;Love the chained method example. Also the OnBase(). Perfect.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4863981320393275450/487935112314420038/comments/default/5430518781794556677'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4863981320393275450/487935112314420038/comments/default/5430518781794556677'/><link rel='alternate' type='text/html' href='http://blog.typemock.com/2008/07/preview-and-questions-on-next-isolator.html?showComment=1216915380000#c5430518781794556677' title=''/><author><name>Travis Illig</name><uri>http://www.blogger.com/profile/00788248807495733520</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.typemock.com/2008/07/preview-and-questions-on-next-isolator.html' ref='tag:blogger.com,1999:blog-4863981320393275450.post-487935112314420038' source='http://www.blogger.com/feeds/4863981320393275450/posts/default/487935112314420038' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-902587100'/></entry><entry><id>tag:blogger.com,1999:blog-4863981320393275450.post-2141855308494069335</id><published>2008-07-24T18:56:00.000+03:00</published><updated>2008-07-24T18:56:00.000+03:00</updated><title type='text'>Thanks for the input Travis.&lt;br&gt;&lt;br&gt;The old API wi...</title><content type='html'>Thanks for the input Travis.&lt;BR/&gt;&lt;BR/&gt;The old API will still be available.&lt;BR/&gt;&lt;BR/&gt;I kinda liked MyTest, what would you prefer?&lt;BR/&gt;&lt;BR/&gt;We will support Base Calls using OnBase&lt;BR/&gt;&lt;BR/&gt;MyTest.WhenCalled(() =&amp;gt; fake.Log()).OnBase().WillReturn(&amp;quot;555&amp;quot;);&lt;BR/&gt;&lt;BR/&gt;We will still have chained methods.&lt;BR/&gt;So you can do:&lt;BR/&gt;&lt;BR/&gt;// I don&amp;#39;t care about HttpWebRequest&lt;BR/&gt;var fakeWebRequest = MyTest.Fake.Instance&amp;lt;HttpWebRequest&amp;gt;(Members.ReturnFakes);&lt;BR/&gt;//setup a specific scenario&lt;BR/&gt;MyTest.WhenCalled(() =&amp;gt; fakeWebRequest.GetResponse().Cookies[&amp;quot;Travis&amp;quot;]).WillReturn(&amp;quot;fakeCookie&amp;quot;);</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4863981320393275450/487935112314420038/comments/default/2141855308494069335'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4863981320393275450/487935112314420038/comments/default/2141855308494069335'/><link rel='alternate' type='text/html' href='http://blog.typemock.com/2008/07/preview-and-questions-on-next-isolator.html?showComment=1216914960000#c2141855308494069335' title=''/><author><name>Eli Lopian</name><uri>http://www.blogger.com/profile/12286680060833640916</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.typemock.com/2008/07/preview-and-questions-on-next-isolator.html' ref='tag:blogger.com,1999:blog-4863981320393275450.post-487935112314420038' source='http://www.blogger.com/feeds/4863981320393275450/posts/default/487935112314420038' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1421418830'/></entry><entry><id>tag:blogger.com,1999:blog-4863981320393275450.post-3979758878573600269</id><published>2008-07-24T18:16:00.000+03:00</published><updated>2008-07-24T18:16:00.000+03:00</updated><title type='text'>Is the old API still going to be available? I'd ha...</title><content type='html'>Is the old API still going to be available? I'd hate to have to rewrite hundreds (of not thousands) of unit tests.&lt;BR/&gt;&lt;BR/&gt;I'm assuming "MyTest" is not the final name of the object that will be the entry point. It'd just be confusing if not.&lt;BR/&gt;&lt;BR/&gt;The top of the post references "Make" but all of the tests show "Fake." Typo?&lt;BR/&gt;&lt;BR/&gt;System.Reflection uses "NonPublic" - I'd keep "NonPublic" to be consistent.&lt;BR/&gt;&lt;BR/&gt;I think it'd be OK to throw an exception if you specify a public method in a nonpublic fake setup. Again, from a consistency perspective, if you tell reflection to list out nonpublic members, you're not going to magically get public ones in the list. I'd make sure the exception message is very clear, though, and include some sort of action - "You tried to call public method 'Foo' as a nonpublic. Use 'MyTest.WhenCalled' instead of 'MyTest.NonPublic.WhenCalled'"&lt;BR/&gt;&lt;BR/&gt;That said, I liked Eli's post where there was only "MyTest.WhenCalled" and no "MyTest.NonPublic.WhenCalled" - the addition of .NonPublic in there felt inconsistent, like I should have a corresponding MyTest.Public.WhenCalled... but then, does it really matter? (If you lose the NonPublic thing entirely, then you shouldn't throw any exceptions if the person accesses a public method using a string name.)&lt;BR/&gt;&lt;BR/&gt;Eli's post also loses the .Static for static method calls. I also like that. I can see there might be some interesting challenges when you get to handling nonpublic statics, but the idea holds - do you need to differentiate? (Eli's post just shows the name of the nonpublic static method being called... but not the type it's attached to.)&lt;BR/&gt;&lt;BR/&gt;Is there a way to mock calls to base class methods? In the current API we have CallBase. Is there an equivalent here?&lt;BR/&gt;&lt;BR/&gt;I also like Eli's "Members.ReturnFakes" example. That HttpRequest thing is even the precise use case where I could see it being handy.&lt;BR/&gt;&lt;BR/&gt;Of course, it may be that the only thing I need to fake is something nested in the request, like a particular cookie coming in. Right now, I can use the recorder API with a chained method call and just have it "work." Not sure how I'd do that here, but it looks like it might be a bit more cumbersome.&lt;BR/&gt;&lt;BR/&gt;I can see this would be very powerful in a DI scenario. Particularly with a framework like Autofac where you can register dependencies using lambdas. Create your fake right in the dependency registration for your tests.&lt;BR/&gt;&lt;BR/&gt;Interesting stuff. Going to have to think on this some more.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4863981320393275450/487935112314420038/comments/default/3979758878573600269'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4863981320393275450/487935112314420038/comments/default/3979758878573600269'/><link rel='alternate' type='text/html' href='http://blog.typemock.com/2008/07/preview-and-questions-on-next-isolator.html?showComment=1216912560000#c3979758878573600269' title=''/><author><name>Travis Illig</name><uri>http://www.blogger.com/profile/00788248807495733520</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.typemock.com/2008/07/preview-and-questions-on-next-isolator.html' ref='tag:blogger.com,1999:blog-4863981320393275450.post-487935112314420038' source='http://www.blogger.com/feeds/4863981320393275450/posts/default/487935112314420038' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-902587100'/></entry></feed>
