Welcome to MSDN Blogs Sign in | Join | Help

June 2008 - Posts

Unit testing non-public types using reflection

Let's say you want to unit test the following class: using System; internal class Foo { internal Foo( object parameter) { if (parameter == null ) throw new ArgumentException (); } internal int ReturnZero() { return 1; } } F irst of all, besides being
Posted by ddietric | 1 Comments
Filed under:

How would you test a... C# code generator with Visual Studio Team Test

Introduction I spent some time this week thinking about how to test a code generator that generates C# code and is itself written in C# (so it's once again all about managed code). At first I thought about how to verify the generator output directly.

Compiling code at runtime, C# 3.0 and "Compiler executable file csc.exe cannot be found"

Compiling code at runtime is incredibly easy thanks to the CSharpCodeProvider class. But as always, there is a catch. Let's say you have the following code snippet somewhere in your shiny new VC# 2008 project: CSharpCodeProvider codeProvider = new CSharpCodeProvider
Posted by ddietric | 0 Comments
 
Page view tracker