Exemplo n.º 1
0
        public virtual void TestEmptyArgForCommands()
        {
            CredentialShell shell = new CredentialShell();

            string[] command = new string[] { "list", "-provider" };
            Assert.Equal("Expected empty argument on " + command + " to return 1"
                         , 1, shell.Init(command));
            foreach (string cmd in Arrays.AsList("create", "delete"))
            {
                shell.SetConf(new Configuration());
                Assert.Equal("Expected empty argument on " + cmd + " to return 1"
                             , 1, shell.Init(new string[] { cmd }));
            }
        }
Exemplo n.º 2
0
        public virtual void TestEmptyArgList()
        {
            CredentialShell shell = new CredentialShell();

            shell.SetConf(new Configuration());
            Assert.Equal(1, shell.Init(new string[0]));
        }
Exemplo n.º 3
0
 public virtual void TestCommandHelpExitsNormally()
 {
     foreach (string cmd in Arrays.AsList("create", "list", "delete"))
     {
         CredentialShell shell = new CredentialShell();
         shell.SetConf(new Configuration());
         Assert.Equal("Expected help argument on " + cmd + " to return 0"
                      , 0, shell.Init(new string[] { cmd, "-help" }));
     }
 }