void CreateViewModel (FakePackageManagementSolution solution)
		{
			viewModelParent = CreateViewModelParent ();
			viewModel = new TestablePackageViewModel (viewModelParent, solution);
			fakePackage = viewModel.FakePackage;
			this.fakeSolution = solution;
			packageManagementEvents = viewModel.PackageManagementEvents;
			fakeLogger = viewModel.FakeLogger;
			fakeUninstallPackageAction = solution.FakeProjectToReturnFromGetProject.FakeUninstallPackageAction;
		}
		public FakePackageManagementProject (string name)
		{
			FakeUninstallPackageAction = new FakeUninstallPackageAction (this) {
				Logger = new FakeLogger ()
			};

			FindPackageAction = packageId => {
				return FakePackages.FirstOrDefault (package => package.Id == packageId);
			};

			this.Name = name;
		}
		public FakePackageManagementProject (string name)
		{
			FakeUninstallPackageAction = new FakeUninstallPackageAction (this) {
				Logger = new FakeLogger ()
			};

			FindPackageAction = packageId => {
				return FakePackages.FirstOrDefault (package => package.Id == packageId);
			};

			UpdatePackageAction = (package, updateAction) => {
				PackagePassedToUpdatePackage = package;
				PackageOperationsPassedToUpdatePackage = updateAction.Operations;
				UpdateDependenciesPassedToUpdatePackage = updateAction.UpdateDependencies;
				AllowPrereleaseVersionsPassedToUpdatePackage = updateAction.AllowPrereleaseVersions;
				IsUpdatePackageCalled = true;
			};

			this.Name = name;
		}
        public FakePackageManagementProject(string name)
        {
            FakeUninstallPackageAction = new FakeUninstallPackageAction(this)
            {
                Logger = new FakeLogger()
            };

            FindPackageAction = packageId => {
                return(FakePackages.FirstOrDefault(package => package.Id == packageId));
            };

            UpdatePackageAction = (package, updateAction) => {
                PackagePassedToUpdatePackage                 = package;
                PackageOperationsPassedToUpdatePackage       = updateAction.Operations;
                UpdateDependenciesPassedToUpdatePackage      = updateAction.UpdateDependencies;
                AllowPrereleaseVersionsPassedToUpdatePackage = updateAction.AllowPrereleaseVersions;
                IsUpdatePackageCalled = true;
            };

            this.Name = name;
        }
Esempio n. 5
0
        public FakePackageManagementProject(string name)
        {
            FakeUninstallPackageAction = new FakeUninstallPackageAction(this)
            {
                Logger = new FakeLogger()
            };

            FindPackageAction = packageId => {
                return(FakePackages.FirstOrDefault(package => package.Id == packageId));
            };

            InstallPackageAction = (package, installAction) => {
                PackagePassedToInstallPackage                 = package;
                PackageOperationsPassedToInstallPackage       = installAction.Operations;
                IgnoreDependenciesPassedToInstallPackage      = installAction.IgnoreDependencies;
                AllowPrereleaseVersionsPassedToInstallPackage = installAction.AllowPrereleaseVersions;
            };

            UpdatePackageAction = (package, updateAction) => {
                PackagePassedToUpdatePackage                 = package;
                PackageOperationsPassedToUpdatePackage       = updateAction.Operations;
                UpdateDependenciesPassedToUpdatePackage      = updateAction.UpdateDependencies;
                AllowPrereleaseVersionsPassedToUpdatePackage = updateAction.AllowPrereleaseVersions;
                IsUpdatePackageCalled = true;
            };

            UninstallPackageAction = (package, uninstallAction) => {
                PackagePassedToUninstallPackage            = package;
                ForceRemovePassedToUninstallPackage        = uninstallAction.ForceRemove;
                RemoveDependenciesPassedToUninstallPackage = uninstallAction.RemoveDependencies;
            };

            CreateUninstallPackageActionFunc = () => FakeUninstallPackageAction;

            this.Name = name;

            ConstraintProvider = NullConstraintProvider.Instance;
        }
		public FakePackageManagementProject (string name)
		{
			FakeUninstallPackageAction = new FakeUninstallPackageAction (this) {
				Logger = new FakeLogger ()
			};

			FindPackageAction = packageId => {
				return FakePackages.FirstOrDefault (package => package.Id == packageId);
			};

			InstallPackageAction = (package, installAction) => {
				PackagePassedToInstallPackage = package;
				PackageOperationsPassedToInstallPackage = installAction.Operations;
				IgnoreDependenciesPassedToInstallPackage = installAction.IgnoreDependencies;
				AllowPrereleaseVersionsPassedToInstallPackage = installAction.AllowPrereleaseVersions;
			};

			UpdatePackageAction = (package, updateAction) => {
				PackagePassedToUpdatePackage = package;
				PackageOperationsPassedToUpdatePackage = updateAction.Operations;
				UpdateDependenciesPassedToUpdatePackage = updateAction.UpdateDependencies;
				AllowPrereleaseVersionsPassedToUpdatePackage = updateAction.AllowPrereleaseVersions;
				IsUpdatePackageCalled = true;
			};

			UninstallPackageAction = (package, uninstallAction) => {
				PackagePassedToUninstallPackage = package;
				ForceRemovePassedToUninstallPackage = uninstallAction.ForceRemove;
				RemoveDependenciesPassedToUninstallPackage = uninstallAction.RemoveDependencies;
			};

			CreateUninstallPackageActionFunc = () => FakeUninstallPackageAction;

			this.Name = name;

			ConstraintProvider = NullConstraintProvider.Instance;
		}
		FakeUninstallPackageAction CreateFakeUninstallAction ()
		{
			fakeUninstallAction = new FakeUninstallPackageAction (project);
			return fakeUninstallAction;
		}
		public FakePackageManagementProject (string name)
		{
			FakeUninstallPackageAction = new FakeUninstallPackageAction (this);

			this.Name = name;
		}
		FakeUninstallPackageAction AddUninstallAction ()
		{
			var action = new FakeUninstallPackageAction (new FakePackageManagementProject ());
			action.Package = new FakePackage ();
			action.Logger = new FakeLogger ();
			actions.Add (action);
			return action;
		}
Esempio n. 10
0
        public FakePackageManagementProject(string name)
        {
            FakeUninstallPackageAction = new FakeUninstallPackageAction(this);

            this.Name = name;
        }