Browse by Tags
All Tags »
TDD (
RSS)
I really like working with StructureMap. Today I had to write a quick Factory that would leverage StructureMap to create returned instances. The Factory would look like this: public class HttpListenerFactory : IHttpListenerFactory { private readonly IConfigurationManager...
More than a year ago, I have posted a blog entry related to what I was trying to implement in one of the projects. Unfortunately, not my team could understand what I was trying to do, neither I was able to make myself clear. Either way, I ended up closing...
There was a lot of noise generated by a blog “The Duct Tape Programmer” . There were lots of responses as well ( link , link , link , link , link , link , link, link …). The last one I read was from Oren , where he puts it plain – just don’t do it. I...
Today I was trying to figure out how to access output Gallio is using to render a warning message. According to this , the Assert.Warning was replaced by TestLog.Warning.WriteLine. But for some reason that is not doing the job. Has anyone encountered...
I was working on some code today, when run into a pitfall with Moq. This was probably my misreading of documentation. The component I was testing looked somewhat like the code below public class SomeOtherType { private readonly ISomeType someType; public...
Write your test code as you would write your production code. In my opinion, a few of the most critical things are: Understanding (Readability and clarity of what the code is doing) Easy of change (be able to reflect changes) Quick safety net (understand...
Anyone who's doing TDD is familiar with the CategoryAttribute coming with the most of frameworks. Today (I am surprised it took us so long!) we got read of [Category( "Integration" )] and started to use the right approach [Category(Categories...
Our team is moving away from Rhino.Mocks to Moq . Rhino.Mocks was the first mocking framework I encountered in my life about a year and a half ago, while taking JP’s Nothing But .NET training course. It was great (the power of mocking), it was weird ...
Today we had a discussion about having strict mocks for all of our dependencies in code. Reason - to force the tests to serve as a safety net for production code. I will try to explain pros and cons of this approach from the point of view myself...
The current project I am involved in, we are using BDD style of testing, where our specifications (tests) are both designing force and documentation for the implementation. One of the interesting cases we are running into, is when we need to express some...
More Posts
Next page »