AWDNUG April - Unit Testing and Mocking
So last night we had a slightly earlier AWDNUG meeting, due to some changes the guys wanted... unfortunately not bringing more people in, like we had hoped (a few people mentioned a change in night would make it easier for them to attend).
There was however, a fantastic presentation by Mabster about Unit Testing, specifically using the NUnit framework and how to go about the process of Test Driven Development.
He provided instructions from the basic setup and it was a great session that gave me a bit more of an idea, because for the moment TDD is kind of an abstract thought to my day-to-day process, and I think it's a hard sell to say to the boss that a 6 month project could be an 8 month project, to allow you time to write the tests... but then I don't think we test adequately at all - there's a lot of faith, and hoping users pick up mistakes before they cost us.
So I was incredibly interested in this session and Mabs happens to be my boss at my work and slowly we're trying to change the thinking of the department and the company, to provide more reliable and solid development.
So I'm hoping the group as a whole got something out of it too.
The other thing we covered was Mocking frameworks, specifically Moq, and that went down a little harder than Unit Testing. Although people got the concept, the verbosity in setting one up (you're more or less replicating what you would code line for line) made them a little reluctant.
It is interesting to think how you would mock an interface without first having written your code to use that interface - because you are kind of copying that code, but providing mock objects... so it's an interesting thought how to do the mocking first, in a TDD scenario, without knowing exactly how your end code works.
Anyway, so that's what we covered. Hopefully next month we'll be doing a Heroes Happen Here launch event with some giveaways, thanks to Microsoft.
