public when_parsing_arguments()
 {
     parser = new ArgParser(new string[] { "test" }, new MockFileSystem());
 }
 public void and_passing_in_null_no_Command_should_be_set()
 {
     var p = new ArgParser(null, new MockFileSystem());
     Assert.Null(p.Command);
 }
 public when_using_a_json_config_file()
 {
     _mockFileSystem = new MockFileSystem() { ReturnFromReadFile = JsonConfig };
     _parser = new ArgParser(null, _mockFileSystem);
 }
 public when_executing_the_NewProject_command()
 {
     _mockFileSystem = new MockFileSystem() { ReturnFromReadFile = null };
     var parser = new ArgParser(new string[] {projectname}, _mockFileSystem);
     parser.Command.Execute();
 }
Exemplo n.º 5
0
        public static ICommand getCommand(string[] args)
        {
            ArgParser parser = new ArgParser(args, new FileSystem(new DirectoryInfoWrapper(Environment.CurrentDirectory), new FileInfoWrapper()));

            return(parser.Command);
        }
 public when_there_is_no_config_file_present()
 {
     _mockFileSystem = new MockFileSystem() { ReturnFromReadFile = null };
     _parser = new ArgParser(null, _mockFileSystem);
 }
 public when_creating_a_new_project()
 {
     dirInfoWrapper = new DirectoryInfoWrapper(Environment.CurrentDirectory);
     args = new string[] {"Test"};
     parser = new ArgParser(args, new FileSystem( dirInfoWrapper, new FileInfoWrapper()));
 }