private static void Usage(GetOpt getOpt) { Console.WriteLine("Usage:"); Console.WriteLine("\tdemo [ <option>... ] <job-file>..."); Console.WriteLine(); Console.WriteLine("Options:"); Console.WriteLine(); Console.WriteLine(getOpt.GetHelp()); Console.WriteLine(); Environment.Exit(0); }
public void TestAttributesSuccess() { var getOpt = new GetOpt(this); Assert.AreEqual(3, getOpt.OptionDefinitions.Count); getOpt.Parse ( "-vlC:\\Temp\\Logfile.txt", "-nroot@localhost", "[email protected]", "-n", "*****@*****.**" ); var help = getOpt.GetHelp(); Assert.IsTrue(verbose); Assert.AreEqual("C:\\Temp\\Logfile.txt", LogFile); Assert.AreEqual(3, EmailNotifications.Count); Assert.IsTrue(EmailNotifications.Contains("root@localhost")); Assert.IsTrue(EmailNotifications.Contains("*****@*****.**")); Assert.IsTrue(EmailNotifications.Contains("*****@*****.**")); }