Ejemplo n.º 1
0
        public void WithConfigurationOverride_CorrectInputs_GetsAddedToAdditionalArguments()
        {
            var cmd = new DummyCommand();

            cmd.WithConfigurationOverride("section123", "name456", "value789");

            CollectionAssert.AreEqual(
                cmd.AdditionalArguments, new[]
            {
                "--config", "section123.name456=\"value789\"",
            });
        }
Ejemplo n.º 2
0
        public void WithAdditionalArgument_CorrectInputs_GetsAddedToAdditionalArguments()
        {
            var cmd = new DummyCommand();

            cmd.WithAdditionalArgument("--argument123");

            CollectionAssert.AreEqual(
                cmd.AdditionalArguments, new[]
            {
                "--argument123",
            });
        }
Ejemplo n.º 3
0
        public void WithConfigurationOverride_NullValue_ThrowsArgumentNullException()
        {
            var cmd = new DummyCommand();

            Assert.Throws <ArgumentNullException>(() => cmd.WithConfigurationOverride("section", "name", null));
        }
Ejemplo n.º 4
0
        public void Constructor_ProducesEmptyAdditionalArguments()
        {
            var cmd = new DummyCommand();

            Assert.That(cmd.AdditionalArguments.Count, Is.EqualTo(0));
        }
Ejemplo n.º 5
0
        public void WithAdditionalArgument_NullOrEmptyArguments_ThrowsArgumentNullException(string input)
        {
            var cmd = new DummyCommand();

            Assert.Throws <ArgumentNullException>(() => cmd.WithAdditionalArgument(input));
        }
Ejemplo n.º 6
0
        public void WithConfigurationOverride_NullOrEmptyName_ThrowsArgumentNullException(string input)
        {
            var cmd = new DummyCommand();

            Assert.Throws <ArgumentNullException>(() => cmd.WithConfigurationOverride("section", input, "value"));
        }
Ejemplo n.º 7
0
        public void Execute_NullOrEmptyRepositoryPath_ThrowsArgumentNullException(string input)
        {
            var command = new DummyCommand();

            Assert.Throws <ArgumentNullException>(() => NonPersistentClient.Execute(input, command));
        }