Exemplo n.º 1
0
        public void Run_should_set_powershell_runner_commands()
        {
            // given
            var task = new InstallChocolateyTask(_powershellMock);

            // when
            task.Run(_logger);

            // then
            Assert.That(_powershellMock.Commands.Length, Is.EqualTo(1));
            Assert.That(_powershellMock.Commands[0], Is.EqualTo("iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex"));
        }
Exemplo n.º 2
0
        public void SetConfiguration_should_set_config_from_properties()
        {
            // given
            var config     = new MockTaskConfig();
            var task       = new InstallChocolateyTask(_powershellMock);
            var properties = new Dictionary <object, object>();

            // when
            task.SetConfiguration(config, properties);

            // then
            Assert.That(task.Config, Is.Not.Null);
        }