예제 #1
0
        public void ShouldFailWithUnknownCommand()
        {
            var createCommand = new CreateCommand();
            var ex            = Assert.ThrowsAny <CommandParsingException>(() => createCommand.Execute("test"));

            Assert.Contains("Unrecognized command or argument 'test'", ex.Message);
        }
예제 #2
0
        public void ShouldNotFailWithValidConfig()
        {
            var createCommand = new CreateCommand();

            string[] args = new string[] { "--configFile", String.Concat(this.configExamplesFolder, "valid.yml") };
            createCommand.Execute(args);
        }
예제 #3
0
        public void ShouldFailWithInvalidSuffix()
        {
            var createCommand = new CreateCommand();

            string[] args = new string[] { "--configFile", String.Concat(this.configExamplesFolder, "invalidSuffix.yml") };
            var      ex   = Assert.ThrowsAny <CommandParsingException>(() => createCommand.Execute(args));

            Assert.Contains("API suffix is required", ex.Message);
        }
예제 #4
0
        public void ShouldFailWithUnknownOption()
        {
            var createCommand = new CreateCommand();

            string[] args = new string[] { "--configurationFile", String.Concat(this.configExamplesFolder, "valid.yml") };
            var      ex   = Assert.ThrowsAny <CommandParsingException>(() => createCommand.Execute(args));

            Assert.Contains("Unrecognized option '--configurationFile'", ex.Message);
        }
예제 #5
0
        public void ShouldFailWithInvalidLinking()
        {
            var createCommand = new CreateCommand();

            string[] args = new string[] { "--configFile", String.Concat(this.configExamplesFolder, "invalidLinking.yml") };
            var      ex   = Assert.ThrowsAny <CommandParsingException>(() => createCommand.Execute(args));

            Assert.Contains("LinkTemplatesBaseUrl is required for linked templates", ex.Message);
        }