My unit testing frameworks consists of TestFixtures, TestMethods and Actions. Action is additional smaller container inside TestMethod, Actions comes from internal Dll written in our company. Actions are used inside methods like that:
[Test]
void TestMethod1()
{
Run(new Sleep { Seconds = 10 } );
}
I have to write an application, which collect all the information about fixtures, tests and actions from DLL. I have found how to enumerate test fixtures and test methods by reflection using type / method attributes.
But I have no idea how enumerate actions inside test methods.
Could you please help? Is it possible to do using reflection at all?
UPDATED:
See the accepted answer. Really cool library. Also you can look here ( WPF: Binding TreeView in MVVM way step by step tutorial ), if you are interested in how I created entity model for fixtures, tests and actions, and binded in MVVM way to TreeView.
Thanks, Alexei Levenkov! Finally I have found a solution using your tip. Sharing. The only thing you should do -> download and reference Mono.Reflection.dll from https://github.com/jbevain/mono.reflection.