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"); }
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"); }
public void Parse_MissingScriptLocationArgument() { string[] args = new[] { "deploy", "--destination", "001", "--db", "SqlServer", "db connection string", "--scripts" }; CmdLineArgs.Parse(args); }
public void Parse_MissingDbConnectionStringArgument() { string[] args = new[] { "deploy", "--destination", "001", "--db", "SqlServer", "--scripts", @"C:\Temp\scripts" }; CmdLineArgs.Parse(args); }
public void Parse_MissingDbTypeArgument() { string[] args = new[] { "deploy", "--destination", "001", "--db", "db connection string", "--scripts", @"C:\Temp\scripts" }; CmdLineArgs.Parse(args); }
public void Parse_ScriptsNotSpecified() { string[] args = new[] { "deploy", "--destination", "001", "--db", "SqlServer", "db connection string" }; CmdLineArgs.Parse(args); }
public void Parse_DbNotSpecified() { string[] args = new[] { "deploy", "--destination", "001", "--scripts", @"C:\Temp\scripts" }; CmdLineArgs.Parse(args); }
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); }