コード例 #1
0
//		[TestCase(new string[] {"get", "-url", "http://www.perdu.com/", "-save", @"C:\Temp\test.txt"},true)]
//		[TestCase(new string[] {"test", "-url", "http://www.perdu.com/", "-times", "5"},true)]
//		[TestCase(new string[] {"test", "-url", "http://www.perdu.com/", "-times", "5", "-avg"},true)]
//		[TestCase(new string[] {"get", "-url", "wrong"},false)]
//		[TestCase(new string[] {"get","-durl", "http://www.perdu.com/"},false)]
//		[TestCase(new string[] {"getd", "-url", "http://www.perdu.com/", "-save", @"C:\Temp\test.txt"},false)]
//		[TestCase(new string[] {"get", "-url","http://www.perdu.com/", "-save", "rrr"},false)]
//		[TestCase(new string[] {"get", "-url", "http://www.perdu.com/", "-savedzz", @"C:\Temp\test.txt"},false)]
//		[TestCase(new string[] {"test", "-urdl", "http://www.perdu.com/", "-times", "5"},false)]
//		[TestCase(new string[] {"testd", "-url", "http://www.perdu.com/", "-times", "5"},false)]
//		[TestCase(new string[] {"test", "-url", "http://www.perdu.com/", "-timesd", "5"},false)]
//		[TestCase(new string[] {"test", "-url", "wrong", "-timesd", "5"},false)]
//		[TestCase(new string[] {" testz", "-url", "http://www.perdu.com/", "-times", "5", "-avg"},false)]
//		[TestCase(new string[] {" test", "-urls", "http://www.perdu.com/", "-timesd", "5", "-avg"},false)]
//		[TestCase(new string[] {" test", "-url", "http://www.perdu.com/", "-times","5", "-avgd"},false)]
//		[TestCase(new string[] {" test", "-url", "wrong", "-times", "5", "-avgd "},false)]
        public void TestArguments(string[] args, bool err)
        {
            var nurl = new ClassNURL();
            var ga   = new GestionArguments(args);

            Assert.AreEqual(ga.VerifieArguments(), err, "Gestion des arguments");
        }
コード例 #2
0
        public static void Main(string[] args)
        {
            GestionArguments ga = new GestionArguments(args);

            ga.Gestion();
            Console.WriteLine("Fin");
            Console.ReadLine();
        }