... Definitely, but I find most often the extracted class is an encapsulated implementation detail that is only used by the class you extracted it from. ... ...
Can I ask what you would do if the new class was not extracted to remove duplication and is only used in one place, such as when you extract a class to make...
... Thats my feeling. Although you are right that TypeMock doesn't force you create nice decoupled designs I've also seen people do some very odd things in...
Greetings Colin, I think that's a judgment call. I personally prefer to not get in the game of which things I think can be potentially reusable. I find that ...
... Well, I generally try to test classes from the "outside" (that is I don't want to get over-coupled to internal details), so I share your concern. But if...
... Your rules about when to use interfaces in the domain seem sensible to me, though we don't even put interfaces on services until there is a need (and so...
... You don't test that your Front Controller correctly dispatches to the appropriate Service? Maybe you don't because you don't have to write code for that. ...
Hi Vishal... I've been holding off answering in the hopes that someone else might have a better answer but since there hasn't been a great response yet I'll...
For a top down approach I would wirte a test for a method like this: public void ChargeCustomer(Customer customer, Money amount) { // implementation } I think...
With an interface. Sent from my iPhone ... Your rules about when to use interfaces in the domain seem sensible to me, though we don't even put interfaces on...
... Sorry yeah, but we use TypeMock so we'd be testing against the concrete class. ... In my experience its common to have logic within one domain entity that...
I realized I didn't explain why I was asking the questions. I'm interested in how you go about using mocking within the domain as a tool to help you drive...
... To that I reply, study Martin Fowler's pages. It details many patterns and gives the motives, advantages, and difficulties of each. I arrived at my...
Martin Fowler wrote (http://martinfowler.com/eaaDev/ModelViewPresenter.html): Upon further study and reflection, I decided that pattern that was here under the...
Alan, I will try to read your list and straighten out my fuzzy ideas. But just for now, here's my aim: use humble dialog; have a layer (presenter?) between the...
... I'm not sure if there is already a name for this, but this is how I typically separate the view and presenter. -- Cory Foy http://www.cornetdesign.com...
Hi All, Thanks to assistance from folks at SourceForge, the nunit.org site is once again in synch with nunit.com and shows the latest info about NUnit. Charlie...
... Which kind of logic? Pure domain logic? or service logic like persistence or participating in a transaction? The former belongs, and the latter does not. ...
... Pure domain logic, our domain model doesn't participate in transactions or persistence or anything else like that. In fact our domain layer really only...
Thanks for your input Cory. I hope to get some from others too. However, I do have a question. Read below. Remember that the point of this thread is to...
My understanding of the difference between MVC and MVP is that in MVC, the view is allowed to access the model directly (all three parts have equal rights to...
... It's not MVC because there is no model in his code. In MVC there is a real bonafide model which is completely independent of all presentation issues, and...
... Thanks for your input Brian. In fact, many people are doing "MVP" but there are many flavours which makes the term confusing. I take it that you follow...
I have created a set of pages on the NUnit web site to list extensions created for use with NUnit. Right now it's a bit sparse but I'll add to it as I receive...
... Nit-pick. The two are not identical, although BDD has its origins in the pro-mock community in London. ... At some point you'll need some of this kind of...
This is my understanding of the difference: In MVP the View is in charge but delegates logic to the presentor, the presentor will then interact with the model...