示例#1
0
 public void Pass_Setup_Argument_Should_Return_True()
 {
     var args = new[] { "--setup" };
     var ap = new CommandLineArgumentManager(args);
     var settings = ap.ParseSettings();
     Assert.IsNotNull(settings);
     Assert.AreEqual(true, settings.SetupDatabase);
 }
示例#2
0
 public void Pass_Short_ConnectionString_Argument_Should_Return_Value()
 {
     var args = new[] { "-c", "CONNSTR" };
     var ap = new CommandLineArgumentManager(args);
     var settings = ap.ParseSettings();
     Assert.IsNotNull(settings);
     Assert.AreEqual("CONNSTR", settings.ConnectionString);
 }
示例#3
0
 public void Pass_Password_Argument_Should_Return_Value()
 {
     var args = new[] { "--password", "PASSWORD" };
     var ap = new CommandLineArgumentManager(args);
     var settings = ap.ParseSettings();
     Assert.IsNotNull(settings);
     Assert.AreEqual("PASSWORD", settings.Password);
 }
示例#4
0
 public void Pass_Server_Argument_Should_Return_Value()
 {
     var args = new[] { "--server", "SERVERNAME" };
     var ap = new CommandLineArgumentManager(args);
     var settings = ap.ParseSettings();
     Assert.IsNotNull(settings);
     Assert.AreEqual("SERVERNAME", settings.Server);
 }
示例#5
0
 public void Pass_Database_Argument_Should_Return_Value()
 {
     var args = new[] { "--database", "DATABASE" };
     var ap = new CommandLineArgumentManager(args);
     var settings = ap.ParseSettings();
     Assert.IsNotNull(settings);
     Assert.AreEqual("DATABASE", settings.Database);
 }
        public static ParachuteSettings GetSettings(string[] args)
        {
            var parser = new CommandLineArgumentManager(args);

            var settings = parser.ParseSettings();

            return settings;
        }
示例#7
0
 public void Pass_Help_Argument_Should_Return_Null()
 {
     var args = new[] { "--help" };
     var ap = new CommandLineArgumentManager(args);
     var settings = ap.ParseSettings();
 }
示例#8
0
 public void Pass_Username_Argument_Should_Return_Value()
 {
     var args = new[] { "--username", "USERNAME" };
     var ap = new CommandLineArgumentManager(args);
     var settings = ap.ParseSettings();
     Assert.IsNotNull(settings);
     Assert.AreEqual("USERNAME", settings.Username);
 }
示例#9
0
 public void Pass_Source_Argument_Should_Return_Value()
 {
     var args = new[] { "--configfile", "C:\\Path\\To\\Files\\" };
     var ap = new CommandLineArgumentManager(args);
     var settings = ap.ParseSettings();
     Assert.IsNotNull(settings);
     Assert.AreEqual("C:\\Path\\To\\Files\\", settings.ConfigFilePath);
 }