Exemplo n.º 1
0
 public void Validate_UpdateCommand_Options(bool valid, string newUserRepo, TokenType ttype)
 {
     Assert.Equal(
         valid,
         RepoOption.Validate(new List <Token>()
     {
         new Token(newUserRepo, ttype)
     }) == null);
 }
Exemplo n.º 2
0
        public static Command Create(Delegate executor = null)
        {
            var cmd = new Command("update", "Download and update local database.");

            cmd.AddAlias("force");

            cmd.Handler = CommandHandler.Create(executor ?? new Action <DataSource, string, string, string>(Execute));

            cmd.AddOption(ProviderOption.Create());
            cmd.AddOption(RepoOption.Create());
            cmd.AddOption(PathOption.Create());

            return(cmd);
        }