• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Design.FakePackageManagementProject类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: AddFakeProjectToReturnFromGetProject

		public FakePackageManagementProject AddFakeProjectToReturnFromGetProject(string name)
		{
			var project = new FakePackageManagementProject(name);
			FakeProjectsToReturnFromGetProject.Add(name, project);
			return project;
		}
开发者ID:kristjan84,项目名称:SharpDevelop,代码行数:6,代码来源:FakePackageManagementSolution.cs


示例17: IsProjectEnabled_PackageIdNotInstalledInProject_ReturnsFalse

        public void IsProjectEnabled_PackageIdNotInstalledInProject_ReturnsFalse()
        {
            CreateFakeSolution();
            CreateSelectedProjects();

            var oldPackage = new FakePackage("Foo", "1.0");
            var newPackage = new FakePackage("Bar", "1.3");

            var project = new FakePackageManagementProject();
            project.FakePackages.Add(oldPackage);

            bool enabled = selectedProjects.CallIsProjectEnabled(project, newPackage);

            Assert.IsFalse(enabled);
        }
开发者ID:ichengzi,项目名称:SharpDevelop,代码行数:15,代码来源:SelectedProjectsForUpdatedPackagesTests.cs


示例18: IsProjectSelected_PackageSameVersionAsPackageIntalledInProject_ReturnsFalse

        public void IsProjectSelected_PackageSameVersionAsPackageIntalledInProject_ReturnsFalse()
        {
            CreateFakeSolution();
            CreateSelectedProjects();

            var oldPackage = new FakePackage("Test", "1.0");
            var newPackage = new FakePackage("Test", "1.0");

            var project = new FakePackageManagementProject();
            project.FakePackages.Add(newPackage);

            bool selected = selectedProjects.CallIsProjectSelected(project, oldPackage);

            Assert.IsFalse(selected);
        }
开发者ID:ichengzi,项目名称:SharpDevelop,代码行数:15,代码来源:SelectedProjectsForUpdatedPackagesTests.cs


示例19: IsProjectEnabled_PackageNewerThanPackageIntalledInProject_ReturnsTrue

        public void IsProjectEnabled_PackageNewerThanPackageIntalledInProject_ReturnsTrue()
        {
            CreateFakeSolution();
            CreateSelectedProjects();

            var oldPackage = new FakePackage("Test", "1.0");
            var newPackage = new FakePackage("Test", "1.3");

            var project = new FakePackageManagementProject();
            project.FakePackages.Add(oldPackage);

            bool enabled = selectedProjects.CallIsProjectEnabled(project, newPackage);

            Assert.IsTrue(enabled);
        }
开发者ID:ichengzi,项目名称:SharpDevelop,代码行数:15,代码来源:SelectedProjectsForUpdatedPackagesTests.cs


示例20: CreateAction

        void CreateAction(string packageId = "MyPackage", string packageVersion = "1.2.3.4")
        {
            project = new FakePackageManagementProject();
            project.AddFakeInstallOperation();

            packageManagementEvents = new PackageManagementEvents();

            action = new ReinstallPackageAction(project, packageManagementEvents);
            action.PackageId = packageId;
            action.PackageVersion = new SemanticVersion(packageVersion);
        }
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:11,代码来源:ReinstallPackageActionTests.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Design.FakePackageManagementSolution类代码示例发布时间:2022-05-26
下一篇:
C# Design.FakePackage类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap