Is there any common practice for testing cmdlets written in C#?
I’m interested in something like this:
[Test]
public void Test1()
{
var cmdlet = new MyCmdlet();
cmdlet.Property1 = "something 1";
cmdlet.Property2 = "something 2";
var actualOutput = Execute(cmdlet);
AssertCmdLetOut(expectedOutput, actualOutput);
}
Not very elegant. But still more than nothing: here.