public UpdateService(NovoClient novoClient, WindowsInstallerClient windowsInstallerClient, IPackageRepository packageRepository, IInstallService installService, IEnvInfo envInfo, Logger logger) { _novoClient = novoClient; _windowsInstallerClient = windowsInstallerClient; _packageRepository = packageRepository; _installService = installService; _envInfo = envInfo; _logger = logger; }
public InstallerContext(string packageId, InstallInteractivityLevel interactivityLevel, WindowsInstallerClient installerClient, NexClient nexClient) { _packageId = packageId; _installerClient = installerClient; _nexClient = nexClient; InteractivityLevel = interactivityLevel; _preOperationInstallRecords = installerClient.GetRecords(); _stopWatch = Stopwatch.StartNew(); }
public void diff_should_return_empty_for_same_list() { var installerClient = new WindowsInstallerClient(); var diffGenerator = new DiffGenerator <WindowsInstallerRecord>(installerClient.GetRecords(), installerClient.GetRecords(), c => $"{c.Is64}_{c.Id}"); diffGenerator.Added().Should().BeEmpty(); diffGenerator.Removed().Should().BeEmpty(); diffGenerator.Updated().Should().BeEmpty(); }
public void diff_should_show_removed() { var installerClient = new WindowsInstallerClient(); var before = installerClient.GetRecords(); var after = installerClient.GetRecords(); after.RemoveAt(20); var diffGenerator = new DiffGenerator <WindowsInstallerRecord>(before, after, c => $"{c.Is64}_{c.Id}"); diffGenerator.Added().Should().BeEmpty(); diffGenerator.Removed().Should().HaveCount(1); diffGenerator.Updated().Should().BeEmpty(); }
public void diff_should_show_updated() { var installerClient = new WindowsInstallerClient(); var before = installerClient.GetRecords(); var after = installerClient.GetRecords(); after[20].Values["foo"] = "bar"; var diffGenerator = new DiffGenerator <WindowsInstallerRecord>(before, after, c => $"{c.Is64}_{c.Id}"); diffGenerator.Added().Should().BeEmpty(); diffGenerator.Removed().Should().BeEmpty(); diffGenerator.Updated().Should().OnlyContain(c => c.Values["foo"].ToString() == "bar"); }
public void diff_should_show_added() { var installerClient = new WindowsInstallerClient(); var before = installerClient.GetRecords(); var after = installerClient.GetRecords(); var newRecord = new WindowsInstallerRecord { Id = "new" }; after.Add(newRecord); var diffGenerator = new DiffGenerator <WindowsInstallerRecord>(before, after, c => $"{c.Is64}_{c.Id}"); diffGenerator.Added().Should().OnlyContain(c => c == newRecord); diffGenerator.Removed().Should().BeEmpty(); diffGenerator.Updated().Should().BeEmpty(); }
public InstallerContextFactory(WindowsInstallerClient windowsInstallerClient, NexClient nexClient) { _windowsInstallerClient = windowsInstallerClient; _nexClient = nexClient; }
public NovoClientFixture() { var installerClient = new WindowsInstallerClient(); _installerRecords = installerClient.GetRecords(); }