public void TestCommonUsage(string arg1, string arg2, bool?expectedVerbose, int?expectedRunId) { string[] args = new string[] { arg1, arg2 }; Command c = new RunCommand(); c.ParseArguments(args); c.Execute(); Assert.Equal <bool?>(expectedVerbose, (c as RunCommand).Verbose); Assert.Equal <int?>(expectedRunId, (c as RunCommand).RunId); Assert.Equal <bool?>(true, (c as RunCommand).GotExecuted); }