Exemple #1
0
 public void GetDoChangeTrue()
 {
     string[] args = { "X", "Y", "Z" };
     Solstice.ReplaceInFiles.YesorNo dc = Solstice.ReplaceInFiles.YesorNo.No;
     for (int i = 0; i < args.Length; i++)
     {
         args[0] = "X"; args[1] = "Y"; args[2] = "Z";
         args[i] = "/go";
         Assert.IsTrue(Solstice.ReplaceInFiles.TryGetDoChange(args, out dc));
     }
     for (int i = 0; i < args.Length; i++)
     {
         args[0] = "X"; args[1] = "Y"; args[2] = "Z";
         args[i] = "/GO";
         Assert.IsTrue(Solstice.ReplaceInFiles.TryGetDoChange(args, out dc));
     }
     for (int i = 0; i < args.Length; i++)
     {
         args[0] = "X"; args[1] = "Y"; args[2] = "Z";
         args[i] = "-go";
         Assert.IsTrue(Solstice.ReplaceInFiles.TryGetDoChange(args, out dc));
     }
     for (int i = 0; i < args.Length; i++)
     {
         args[0] = "X"; args[1] = "Y"; args[2] = "Z";
         args[i] = "-GO";
         Assert.IsTrue(Solstice.ReplaceInFiles.TryGetDoChange(args, out dc));
     }
 }
Exemple #2
0
 public void GetDoChangeFalse()
 {
     string[] args = new string[3];
     Solstice.ReplaceInFiles.YesorNo dc = Solstice.ReplaceInFiles.YesorNo.No;
     args[0] = "X"; args[1] = "Y"; args[2] = "Z";
     Assert.IsFalse(Solstice.ReplaceInFiles.TryGetDoChange(args, out dc));
     args[0] = "/Gordon";
     Assert.IsFalse(Solstice.ReplaceInFiles.TryGetDoChange(args, out dc));
     args[0] = "/golly";
     Assert.IsFalse(Solstice.ReplaceInFiles.TryGetDoChange(args, out dc));
     args[0] = "-Guy";
     Assert.IsFalse(Solstice.ReplaceInFiles.TryGetDoChange(args, out dc));
     args[0] = "-gruesome";
     Assert.IsFalse(Solstice.ReplaceInFiles.TryGetDoChange(args, out dc));
 }