NUnit to xUnit automatic test conversion: source code transformation
In the previous post I wrote about how I find the patterns in the code that I would like to refactor using simple C# syntax. Basically, I write the exact expression I would like to find with some wildcards that match the varying parts and the rest is matched as is. A bit like a regexp or a shell file glob. Like this:
Assert.That(_, Is.EqualTo(_)) Assert.That(_, Throws.TypeOf<_>()) or
_._(_, _) if you’d like to go extreme and match every member function call with two parameters.
0xDEADBEEF