Esempio n. 1
0
        public void NoUpdatesFoundDoesNothing()
        {
            EngineEnvironmentSettings.SettingsLoader.Components.Register(typeof(MockNupkgUpdater));

            // start with nothing "installed", so checking what was installed can happen.
            MockInstaller installer = new MockInstaller();

            IInstallUnitDescriptor installDescriptor = new MockInstallUnitDescriptor()
            {
                Details                = new Dictionary <string, string>(),
                FactoryId              = NupkgInstallUnitDescriptorFactory.FactoryId,
                Identifier             = "MockPackage",
                MountPointId           = new Guid("C5A4D83F-7005-4B38-BF47-DFF5CB5F5881"),
                UserReadableIdentifier = "Mock Package"
            };

            TemplateUpdateCoordinator coordinator = new TemplateUpdateCoordinator(EngineEnvironmentSettings, installer);

            Assert.Empty(installer.Installed);

            List <IInstallUnitDescriptor> installsToUpdate = new List <IInstallUnitDescriptor>();

            coordinator.UpdateTemplates(installsToUpdate, () => Console.ReadLine(), true);
            Assert.Empty(installer.Installed);
        }
Esempio n. 2
0
 public CliTemplateUpdater(IEngineEnvironmentSettings environmentSettings, IInstaller installer, string commandName)
 {
     _commandName       = commandName;
     _updateCoordinator = new TemplateUpdateCoordinator(environmentSettings, installer);
 }