void AddNuGetProjectAction (string packageId, string packageVersion, NuGetProjectActionType actionType)
		{
			var projectAction = new FakeNuGetProjectAction (packageId, packageVersion, actionType);
			ProjectActions.Add (projectAction);
		}
		void AddUninstallPackageFromProjectAction (string packageId, string version)
		{
			var projectAction = new FakeNuGetProjectAction (packageId, version, NuGetProjectActionType.Uninstall);
			packageManager.UpdateActions.Add (projectAction);
		}
		void AddUninstallPackageIntoProjectAction (string packageId, string version)
		{
			var projectAction = new FakeNuGetProjectAction (packageId, version, NuGetProjectActionType.Uninstall);
			action.UninstallAction.PackageManager.UninstallActions.Add (projectAction);
		}
        void AddNuGetProjectAction(string packageId, string packageVersion, NuGetProjectActionType actionType)
        {
            var projectAction = new FakeNuGetProjectAction(packageId, packageVersion, actionType);

            ProjectActions.Add(projectAction);
        }
		public void Instrumentation_OnePackageUpdatedWithTwoPackageOperations_UninstallCounterIncremented ()
		{
			CreateRunner ();
			var action = AddUpdateAction ();
			var projectAction = new FakeNuGetProjectAction ("Bar", "1.3", NuGetProjectActionType.Install);
			action.PackageManager.UpdateActions.Add (projectAction);
			projectAction = new FakeNuGetProjectAction ("Foo", "1.1", NuGetProjectActionType.Uninstall);
			action.PackageManager.UpdateActions.Add (projectAction);

			Run ();

			AssertUninstallCounterIncrementedForPackage ("Foo", "1.1");
			AssertInstallCounterIncrementedForPackage ("Bar", "1.3");
		}
		public void Instrumentation_OnePackageUninstalledWithNoVersion_UninstallCounterIncremented ()
		{
			CreateRunner ();
			var action = AddUninstallAction ();
			var projectAction = new FakeNuGetProjectAction ("Test", null, NuGetProjectActionType.Uninstall);
			action.PackageManager.UninstallActions.Add (projectAction);

			Run ();

			AssertUninstallCounterIncrementedForPackage ("Test");
		}
		void AddInstallPackageIntoProjectAction (FakeNuGetPackageManager packageManager, string packageId, string version)
		{
			var projectAction = new FakeNuGetProjectAction (packageId, version, NuGetProjectActionType.Install);
			packageManager.InstallActions.Add (projectAction);
		}
		void AddInstallActionWithCustomExecuteAction (Action executionAction)
		{
			var action = AddInstallAction ();
			action.PackageManager.BeforeExecuteAction = executionAction;
			var projectAction = new FakeNuGetProjectAction ("Test", "1.2", NuGetProjectActionType.Install);
			action.PackageManager.InstallActions.Add (projectAction);
		}