-
Recent Posts
Recent Comments
- Pakistanjobs.pk on Windows Forms Data Binding
- Dale on I Heart ReSharper!
- joey on I Heart ReSharper!
- joey on I Heart ReSharper!
- remi bourgarel on I Heart ReSharper!
Archives
Categories
Meta
Category Archives: TDD
Why do TDD?
Because sometimes your test passes the first time you write it. Either you’re done writing any more code, or your understanding of how your code is supposed to work is wrong. Both paths lead to a better spot than without … Continue reading
Are you Mocking Me?
Jimmy has had a couple posts (mocks, mocks, and less mocks) that prompted Derick to post this on his experience with tests – I’d like to add my thoughts to mix. First, let me say I’m not offering an answer … Continue reading
Also posted in Books
3 Comments
Defining unit tests
I don’t know where I got off the tracks on this one, but I’m really liking Michael Feathers’ definition of a unit test: A test is not a unit test if: It talks to the database It communicates across the … Continue reading
Putting mocks in their place
Awhile back, I talked about 3 simple rules for Rhino Mocks: Use the static MockRepository.GenerateMock method. Don’t use an instance of a MockRepository, and don’t use the GenerateStub method. If the mocked instance method returns a value, use the Stub … Continue reading
Capturing Rhino Mocks arguments in C# 4.0
As a quick review, a test fixture has inputs and outputs. We set up our test fixture by configuring inputs. We observe the results through the fixture’s outputs. Inputs and outputs can be grouped into direct and indirect variants. Direct … Continue reading
Willed and forced design
Roy Osherove, as a TypeMock employee, presents quite a dilemma from opinionated TDD blog posts simply because whether he has one or not, there’s always the question of agenda. Which is quite unfortunate, everyone has some sort of selfish agenda … Continue reading
How not to implement a failing test
One of the first things I change in ReSharper, along with one of my biggest pet peeves is a failing test that fails because of something like this: public class CombinedStreetAddressResolver : NullSafeValueResolver<Address, string> { protected override string ResolveCore(Address model) … Continue reading
Simple BDD/TDD
Todays theory is most tests and specs should be very short (2-3 lines), have at most a setup for context establishment, avoid the majority of test framework features as they should be used as an exception and not as a … Continue reading
“Hero Mode Refactoring” AKA Enemy Of Brown Field Development
What do I mean by “Hero Mode Refactoring”? We’ve all worked with code that wasn’t easily made testable. Most of the time we see a big ball of mud and have no idea where to begin. Sometimes however we have … Continue reading
Also posted in Design Patterns
Leave a comment
Updated TDD Productivity Plug-in for Resharper
I first want to thank JetBrains for being pretty awesome. I have complained a lot about how they are constantly chaining their APIs to Resharper and as a result it makes keeping plugins very hard to maintain but they … Continue reading
