Welcome to MSDN Blogs Sign in | Join | Help

October 2006 - Posts

Mocking Generic Methods With NMock2

Recently I was asked how to mock a generic method, now that NMock2 supports generics. Here's how: Suppose you have this interface: public interface IMyInterface { T DoStuff<T>(); } And this class using IMyInterface: public class MyClass { private
Posted by ploeh | 14 Comments
Filed under:

Generating NotImplementedException Instead Of Exception

Ever since I started using Visual Studio 2005, I've been enjoying its refactoring features, but it has always been bugging me that when you generate a new method stub or implement an interface or abstract class, the auto-generated method throws System.Exception
Posted by ploeh | 0 Comments
Filed under:

Console Unit Testing

In many scenarios, console applications are very useful, but if you have a console application of intermediate complexity, you should obviously unit test it like all the other code you write - right? If you have a console application as an administration

Speaking at .NET Days 2006

The week after speaking at TechEd , I'll be giving a talk at .NET Days 2006 in Ã…rhus. In this talk , I'll be talking a bit about data access component testing. In my terminology , these are not unit tests, but integration tests, but that does not mean
Posted by ploeh | 0 Comments
 
Page view tracker