public void make_sure_we_dont_go_over_the_size_of_the_colletion_of_arguements() { string[] arguments = new[] { "flag1" }; Arguments target = new Arguments(arguments); string argumentValue = target.GetArgumentValue("flag1"); //make sure it comes back empty or null since it didn't exist in the collection of arguments Assert.IsNull(argumentValue, "Value should be null or empty"); }
public void no_scriptDirectory_passed_in_so_we_default_to_working_directory() { string[] arguments = new[] { "test", "asdf", ArgumentConstants.RunWithoutTransactionArg }; Arguments target = new Arguments(arguments); string argumentValue = target.GetArgumentValue(ArgumentConstants.ScriptDirectoryArg); //make sure its the applications working directory string appLocation = Environment.CurrentDirectory;//Assembly.GetExecutingAssembly().CodeBase; Assert.AreEqual(appLocation, argumentValue, string.Format("they should both be '{0}", appLocation)); }
public void find_argument_value() { string loc = @"C:\test"; string[] arguments = new[] { ArgumentConstants.ScriptDirectoryArg, loc, "asdf", "asdf" }; // TODO: Initialize to an appropriate value Arguments target = new Arguments(arguments); // TODO: Initialize to an appropriate value //try to get the value string argumentValue = target.GetArgumentValue(ArgumentConstants.ScriptDirectoryArg); //make sure they are equal Assert.IsNotNull(argumentValue, "arg value came back null"); Assert.AreEqual(loc, argumentValue, "They should be the same"); }