nunit-addins

How can I create a MethodInfo from an Action delegate

I am trying to develop an NUnit addin that dynamically adds test methods to a suite from an object that contains a list of Action delegates. The problem is that NUnit appears to be leaning heavily on reflection to get the job done. Consequently, it looks like there's no simple way to add my Actions directly to the suite. I must, inste...

How do I invoke a MethodInfo that was created from an anonymous method?

In a previous question, I asked how to get a MethodInfo from an Action delegate. This Action delegate was created anonymously (from a Lambda). The problem I'm having now is that I can't invoke the MethodInfo, because it requires an object to which the MethodInfo belongs. In this case, since the delegates are anonymous, there is no own...

How to write a NUnit test for an NUnit add-in?

I'm working on a variation of this stack overflow answer that provides reliable cleanup of tests. How do you write unit tests for NUnit addins? Examining how NUnit self tests, I have determined: You can write tests, that pass, that verify correct behavior of NUnit for failing tests. You write unit tests against test fixtures in a s...