当前位置: 首页>>代码示例>>C#>>正文


C# Design.FakePackageManagementProject类代码示例

本文整理汇总了C#中ICSharpCode.PackageManagement.Design.FakePackageManagementProject的典型用法代码示例。如果您正苦于以下问题:C# FakePackageManagementProject类的具体用法?C# FakePackageManagementProject怎么用?C# FakePackageManagementProject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


FakePackageManagementProject类属于ICSharpCode.PackageManagement.Design命名空间,在下文中一共展示了FakePackageManagementProject类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateInstallActionWithNoPowerShellScripts

		void CreateInstallActionWithNoPowerShellScripts()
		{
			var fakeProject = new FakePackageManagementProject();
			fakeAction = new FakeInstallPackageAction(fakeProject);
			fakeAction.Operations = new PackageOperation[0];
			fakeActions.Add(fakeAction);
		}
开发者ID:Paccc,项目名称:SharpDevelop,代码行数:7,代码来源:PackageActionRunnerTests.cs

示例2: CreateAction

		void CreateAction()
		{
			fakePackageManagementEvents = new FakePackageManagementEvents();
			fakeProject = new FakePackageManagementProject();
			action = new InstallPackageAction(fakeProject, fakePackageManagementEvents);
			installPackageHelper = new InstallPackageHelper(action);
		}
开发者ID:Netring,项目名称:SharpDevelop,代码行数:7,代码来源:InstallPackageActionTests.cs

示例3: CreateInstallAction

		FakeInstallPackageAction CreateInstallAction()
		{
			var project = new FakePackageManagementProject();
			var action = new FakeInstallPackageAction(project);
			action.Operations = new PackageOperation[0];
			return action;
		}
开发者ID:Paccc,项目名称:SharpDevelop,代码行数:7,代码来源:ConsolePackageActionRunnerTests.cs

示例4: AddInstallAction

		FakeInstallPackageAction AddInstallAction()
		{
			var project = new FakePackageManagementProject();
			var action = new FakeInstallPackageAction(project);
			actionsToRun.AddAction(action);
			return action;
		}
开发者ID:hpsa,项目名称:SharpDevelop,代码行数:7,代码来源:InvokeProcessPackageActionsCmdletTests.cs

示例5: CreateSolution

		void CreateSolution()
		{
			fakePackageManagementEvents = new FakePackageManagementEvents();
			fakeProject = new FakePackageManagementProject();
			action = new UpdatePackageAction(fakeProject, fakePackageManagementEvents);
			updatePackageHelper = new UpdatePackageHelper(action);
		}
开发者ID:yuriykipnis,项目名称:SharpDevelop,代码行数:7,代码来源:UpdatePackageActionTests.cs

示例6: CreateAction

		void CreateAction()
		{
			fakeProject = new FakePackageManagementProject();
			fakeScriptFactory = new FakePackageScriptFactory();
			fakeScriptRunner = new FakePackageScriptRunner();
			action = new RunPackageScriptsAction(fakeProject, fakeScriptRunner, fakeScriptFactory);
		}
开发者ID:hpsa,项目名称:SharpDevelop,代码行数:7,代码来源:RunPackageScriptsActionTests.cs

示例7: AddAction

		InstallPackageAction AddAction()
		{
			var project = new FakePackageManagementProject();
			var events = new FakePackageManagementEvents();
			var action = new InstallPackageAction(project, events);
			actions.AddAction(action);
			return action;
		}
开发者ID:hpsa,项目名称:SharpDevelop,代码行数:8,代码来源:PackageActionsToRunTests.cs

示例8: TestableProcessPackageAction

		public TestableProcessPackageAction(
			FakePackageManagementProject project,
			FakePackageManagementEvents packageManagementEvents)
			: base(project, packageManagementEvents)
		{
			FakeProject = project;
			FakePackageManagementEvents = packageManagementEvents;
			this.Package = FakePackage;
		}
开发者ID:Rew,项目名称:SharpDevelop,代码行数:9,代码来源:TestableProcessPackageAction.cs

示例9: FakePackageManagementProjectFactory

		public FakePackageManagementProjectFactory()
		{
			CreatePackageManagementProject = (sourceRepository, project) => {
				RepositoriesPassedToCreateProject.Add(sourceRepository);
				ProjectsPassedToCreateProject.Add(project);
				
				var fakeProject = new FakePackageManagementProject();
				FakeProjectsCreated.Add(fakeProject);
				return fakeProject;
			};
		}
开发者ID:Paccc,项目名称:SharpDevelop,代码行数:11,代码来源:FakePackageManagementProjectFactory.cs

示例10: CreateAction

		void CreateAction()
		{
			fakeProject = new FakePackageManagementProject();
			fakeScriptFactory = new FakePackageScriptFactory();
			fakeScriptRunner = new FakePackageScriptRunner();
			globalMSBuildProjectCollection = MockRepository.GenerateStub<IGlobalMSBuildProjectCollection>();
			action = new RunPackageScriptsAction(
				fakeProject,
				fakeScriptRunner,
				fakeScriptFactory,
				globalMSBuildProjectCollection);
		}
开发者ID:Paccc,项目名称:SharpDevelop,代码行数:12,代码来源:RunPackageScriptsActionTests.cs

示例11: Execute_MethodCalled_RunPackageScriptsActionCreatedUsingProject

		public void Execute_MethodCalled_RunPackageScriptsActionCreatedUsingProject()
		{
			CreateAction();
			var expectedProject = new FakePackageManagementProject();
			action.Project = expectedProject;
			action.PackageScriptRunner = new FakePackageScriptRunner();
			action.Execute();
			
			var actualProject = action.ProjectPassedToCreateRunPackageScriptsAction;
			
			Assert.AreEqual(expectedProject, actualProject);
		}
开发者ID:hpsa,项目名称:SharpDevelop,代码行数:12,代码来源:ProcessPackageActionTests.cs

示例12: Execute_PackageInstallDirectoryIsSet_ProjectSessionVariableIsSet

        public void Execute_PackageInstallDirectoryIsSet_ProjectSessionVariableIsSet()
        {
            CreateScript();
            var expectedProject = new TestableDTEProject();
            var project = new FakePackageManagementProject();
            project.DTEProject = expectedProject;
            script.Project = project;
            ExecuteScript();

            var projectVariable = fakeSession.VariablesAdded["__project"];

            Assert.AreEqual(expectedProject, projectVariable);
        }
开发者ID:ichengzi,项目名称:SharpDevelop,代码行数:13,代码来源:PackageInstallScriptTests.cs

示例13: CreateScript

        void CreateScript()
        {
            fakeFileSystem = new FakeFileSystem();
            fakeFileSystem.FileExistsReturnValue = true;
            fakeFileSystem.DirectoryExistsReturnValue = true;
            scriptFileName = new PackageUninstallScriptFileName(fakeFileSystem);

            fakeSession = new FakePackageScriptSession();
            fakePackage = new FakePackage();

            fakeProject = new FakePackageManagementProject();

            script = new PackageUninstallScript(fakePackage, scriptFileName);
            script.Project = fakeProject;
        }
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:15,代码来源:PackageUninstallScriptTests.cs

示例14: GetInstalledPackages_PackageInstalledInProjectAndProjectIsSelected_ReturnsPackageInstalledInProject

        public void GetInstalledPackages_PackageInstalledInProjectAndProjectIsSelected_ReturnsPackageInstalledInProject()
        {
            CreateFakeSolution();
            List<IProject> projectsAddedToSolution = AddSolutionWithTwoProjectsToProjectService();
            fakeSolution.FakeActiveMSBuildProject = projectsAddedToSolution[0];
            fakeSolution.FakeActiveMSBuildProject.Name = "MyProject";

            var package = new FakePackage("Test");
            var project = new FakePackageManagementProject("MyProject");
            project.FakePackages.Add(package);
            fakeSolution.FakeProjectsToReturnFromGetProject.Add("MyProject", project);
            CreateSelectedProjects();

            var repository = new FakePackageRepository();
            IQueryable<IPackage> packages = selectedProjects.GetPackages(repository);

            var expectedPackages = new FakePackage[] {
                package
            };

            PackageCollectionAssert.AreEqual(expectedPackages, packages);
        }
开发者ID:ichengzi,项目名称:SharpDevelop,代码行数:22,代码来源:PackageManagementSelectedProjectsTests.cs

示例15: ProjectHasPackageInstalled

 static FakePackage ProjectHasPackageInstalled(FakePackageManagementProject project, string packageId, string version)
 {
     FakePackage package = project.FakeLocalRepository.AddFakePackageWithVersion(packageId, version);
     project.FakePackages.Add(package);
     return package;
 }
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:6,代码来源:UpdatePackageCmdletTests.cs


注:本文中的ICSharpCode.PackageManagement.Design.FakePackageManagementProject类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。