コード例 #1
0
        public void Parse_BaselineDeploy()
        {
            string[]    args   = new[] { "deploy", "--destination", "001", "--db", "SqlServer", "db connection string", "--scripts", @"C:\Temp\scripts" };
            CmdLineArgs result = CmdLineArgs.Parse(args);

            Assert.IsNotNull(result, "result");
            Assert.AreEqual("deploy", result.Mode, "Mode");
            Assert.AreEqual("001", result.Destination, "Destination");
            Assert.AreEqual("SqlServer", result.DbType, "DbType");
            Assert.AreEqual("db connection string", result.DbConnectionString, "DbConnectionString");
            Assert.AreEqual(@"C:\Temp\scripts", result.ScriptLocation, "ScriptLocation");
        }
コード例 #2
0
        public void Parse_ArgNamesNotCaseSensitiveDeploy()
        {
            string[]    args   = new[] { "DEploY", "--DestINAtion", "aBcDEf", "--Db", "sQLseRVEr", "db connection string", "--SCRipTS", @"C:\Temp\scripts" };
            CmdLineArgs result = CmdLineArgs.Parse(args);

            Assert.IsNotNull(result, "result");
            Assert.AreEqual("DEploY", result.Mode, "Mode");
            Assert.AreEqual("aBcDEf", result.Destination, "Destination");
            Assert.AreEqual("sQLseRVEr", result.DbType, "DbType");
            Assert.AreEqual("db connection string", result.DbConnectionString, "DbConnectionString");
            Assert.AreEqual(@"C:\Temp\scripts", result.ScriptLocation, "ScriptLocation");
        }
コード例 #3
0
 public void Parse_MissingScriptLocationArgument()
 {
     string[] args = new[] { "deploy", "--destination", "001", "--db", "SqlServer", "db connection string", "--scripts" };
     CmdLineArgs.Parse(args);
 }
コード例 #4
0
 public void Parse_MissingDbConnectionStringArgument()
 {
     string[] args = new[] { "deploy", "--destination", "001", "--db", "SqlServer", "--scripts", @"C:\Temp\scripts" };
     CmdLineArgs.Parse(args);
 }
コード例 #5
0
 public void Parse_MissingDbTypeArgument()
 {
     string[] args = new[] { "deploy", "--destination", "001", "--db", "db connection string", "--scripts", @"C:\Temp\scripts" };
     CmdLineArgs.Parse(args);
 }
コード例 #6
0
 public void Parse_ScriptsNotSpecified()
 {
     string[] args = new[] { "deploy", "--destination", "001", "--db", "SqlServer", "db connection string" };
     CmdLineArgs.Parse(args);
 }
コード例 #7
0
 public void Parse_DbNotSpecified()
 {
     string[] args = new[] { "deploy", "--destination", "001", "--scripts", @"C:\Temp\scripts" };
     CmdLineArgs.Parse(args);
 }
コード例 #8
0
 public void Parse_DoubleScripts()
 {
     string[] args = new[] { "deploy", "--destination", "001", "--db", "SqlServer", "db connection string", "--scripts", @"C:\Temp\scripts", "--scripts", @"C:\Temp\scripts2" };
     CmdLineArgs.Parse(args);
 }