public override void Context() { Configuration = Scenario.list(); Scenario.reset(Configuration); Scenario.add_packages_to_source_location(Configuration, Configuration.Input + "*" + Constants.PackageExtension); Scenario.add_packages_to_source_location(Configuration, "installpackage*" + Constants.PackageExtension); Scenario.install_package(Configuration, "installpackage", "1.0.0"); Scenario.install_package(Configuration, "upgradepackage", "1.0.0"); Service = NUnitSetup.Container.GetInstance<IChocolateyPackageService>(); }
public override void Context() { Configuration = Scenario.install(); Scenario.reset(Configuration); Configuration.PackageNames = Configuration.Input = "installpackage"; Scenario.add_packages_to_source_location(Configuration, Configuration.Input + "*" + Constants.PackageExtension); Scenario.add_packages_to_source_location(Configuration, "badpackage.1*" + Constants.PackageExtension); Service = NUnitSetup.Container.GetInstance<IChocolateyPackageService>(); CommandExecutor = new CommandExecutor(NUnitSetup.Container.GetInstance<IFileSystem>()); }
public override void Context() { Configuration = Scenario.upgrade(); Scenario.reset(Configuration); Configuration.PackageNames = Configuration.Input = "upgradepackage"; Scenario.add_packages_to_source_location(Configuration, Configuration.Input + "*" + Constants.PackageExtension); Scenario.add_packages_to_source_location(Configuration, "installpackage*" + Constants.PackageExtension); Scenario.add_packages_to_source_location(Configuration, "badpackage*" + Constants.PackageExtension); Scenario.install_package(Configuration, "installpackage", "1.0.0"); Scenario.install_package(Configuration, "upgradepackage", "1.0.0"); Configuration.SkipPackageInstallProvider = true; Scenario.install_package(Configuration, "badpackage", "1.0"); Configuration.SkipPackageInstallProvider = false; Service = NUnitSetup.Container.GetInstance<IChocolateyPackageService>(); }
public LocalSourceControlViewModel( IChocolateyPackageService chocolateyService, IProgressService progressService, IPersistenceService persistenceService, Func<Type, ILogService> logFactory) { if (logFactory == null) { throw new ArgumentNullException("logFactory"); } this._chocolateyService = chocolateyService; this._progressService = progressService; this._persistenceService = persistenceService; this._logService = logFactory(typeof(LocalSourceControlViewModel)); PackagesChangedEventManager.AddListener(this._chocolateyService, this); this.Packages = new ObservableCollection<IPackageViewModel>(); this._packages = new List<IPackageViewModel>(); }
public static void install_package(ChocolateyConfiguration config, string packageId, string version) { if (_service == null) { _service= NUnitSetup.Container.GetInstance<IChocolateyPackageService>(); } var originalPackageName = config.PackageNames; var originalPackageVersion = config.Version; config.PackageNames = packageId; config.Version = version; _service.install_run(config); config.PackageNames = originalPackageName; config.Version = originalPackageVersion; //var pattern = "{0}.{1}{2}".format_with(packageId, string.IsNullOrWhiteSpace(version) ? "*" : version, Constants.PackageExtension); //var files = _fileSystem.get_files(config.Sources, pattern); //foreach (var file in files) //{ // var packageManager = NugetCommon.GetPackageManager(config, new ChocolateyNugetLogger(), null, null, false); // packageManager.InstallPackage(new OptimizedZipPackage(file), false,false); //} }
public ChocolateyUpgradeCommand(IChocolateyPackageService packageService) { _packageService = packageService; }
//todo: v1 Deprecation - remove version public ChocolateyVersionCommand(IChocolateyPackageService packageService) : base(packageService) { _packageService = packageService; }
public ChocolateyPushCommand(IChocolateyPackageService packageService, IChocolateyConfigSettingsService configSettingsService) { _packageService = packageService; _configSettingsService = configSettingsService; }
public ChocolateyInfoCommand(IChocolateyPackageService packageService) : base(packageService) { }
public static void install_package(ChocolateyConfiguration config, string packageId, string version) { if (_service == null) { _service = NUnitSetup.Container.GetInstance<IChocolateyPackageService>(); } var installConfig = config.deep_copy(); installConfig.PackageNames = packageId; installConfig.Version = version; _service.install_run(installConfig); NUnitSetup.MockLogger.Messages.Clear(); }
public ChocolateyPushCommand(IChocolateyPackageService packageService, IChocolateyConfigSettingsService configSettingsService) { _packageService = packageService; _configSettingsService = configSettingsService; }
public ChocolateyListCommand(IChocolateyPackageService packageService) { _packageService = packageService; }
public ChocolateyUpgradeCommand(IChocolateyPackageService packageService) { _packageService = packageService; }
public ChocolateyOutdatedCommand(IChocolateyPackageService packageService) { _packageService = packageService; }
public ChocolateyInfoCommand(IChocolateyPackageService packageService) : base(packageService) { }
//todo: v1 Deprecation - remove version public ChocolateyVersionCommand(IChocolateyPackageService packageService) : base(packageService) { _packageService = packageService; }
public static void RemoveListener(IChocolateyPackageService service, IWeakEventListener listener) { CurrentManager.ProtectedRemoveListener(service, listener); }
//todo: v1 Deprecation - update is removed or becomes package indexes public ChocolateyUpdateCommand(IChocolateyPackageService packageService) : base(packageService) { }
public ChocolateyOutdatedCommand(IChocolateyPackageService packageService) { _packageService = packageService; }
//todo: v1 Deprecation - update is removed or becomes package indexes public ChocolateyUpdateCommand(IChocolateyPackageService packageService) : base(packageService) { }
public LogTesting() { Service = chocolatey.tests.integration.NUnitSetup.Container.GetInstance <IChocolateyPackageService>(); }
public ChocolateyInstallCommand(IChocolateyPackageService packageService) { _packageService = packageService; }
public ChocolateyListCommand(IChocolateyPackageService packageService) { _packageService = packageService; }
public ChocolateyInstallCommand(IChocolateyPackageService packageService) { _packageService = packageService; }
public ChocolateyDescribeCommand(IChocolateyPackageService packageService) : base(packageService) { _packageService = packageService; }
public static IPackageViewModel GetLatest(string id, IChocolateyPackageService chocolateyService, Func<IPackageViewModel> packageFactory, Uri source, bool includePrerelease = false) { throw new NotImplementedException(); }
public PackageViewModel(IPackageService packageService, IChocolateyPackageService chocolateyService, INavigationService navigationService) { this._packageService = packageService; this._chocolateyService = chocolateyService; this._navigationService = navigationService; PackagesChangedEventManager.AddListener(this._chocolateyService, this); this._isInstalled = new Lazy<bool>(() => this._chocolateyService.IsPackageInstalled(this.Id, this.Version)); }
public static void RemoveListener(IChocolateyPackageService service, IWeakEventListener listener) { CurrentManager.ProtectedRemoveListener(service, listener); }