private static void Check( Application app, string userName, string test, bool wibble, int age, Application.DaysOfWeek dow) { Assert.AreEqual(userName, app.UserName, "UserName differs"); Assert.AreEqual(test, app.Test, "Test differs"); Assert.AreEqual(wibble, app.Wibble, "Wibble differs"); Assert.AreEqual(age, app.Age, "Age differs"); Assert.AreEqual(dow, app.DoW, "Dow differs"); }
private static CommandLineParser Check(Application app, string commandLine, string userName, string test, bool wibble, int age, Application.DaysOfWeek dow) { CommandLineParser parser = app.Run(@"""C:\Test\Apps\Test.exe"" " + commandLine); Assert.AreEqual(@"""C:\Test\Apps\Test.exe""", parser.ApplicationName); Check(app, userName, test, wibble, age, dow); return(parser); }
private static CommandLineParser Check(string commandLine, string userName, string test, bool wibble, int age, Application.DaysOfWeek dow) { Application app = new Application(); return(Check(app, commandLine, userName, test, wibble, age, dow)); }