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

C# Design.FakePackage类代码示例

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

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



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

示例1: CreateInstallOperationWithFile

        public static PackageOperation CreateInstallOperationWithFile(string fileName)
        {
            var package = new FakePackage();
            package.AddFile(fileName);

            return new PackageOperation(package, PackageAction.Install);
        }
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:7,代码来源:PackageOperationHelper.cs


示例2: TestablePackageViewModel

        public TestablePackageViewModel(
			IPackageViewModelParent parent,
			FakePackage package,
			PackageManagementSelectedProjects selectedProjects,
			FakePackageManagementEvents packageManagementEvents,
			FakePackageActionRunner actionRunner,
			FakeLogger logger)
            : base(parent,
				package,
				selectedProjects,
				packageManagementEvents,
				actionRunner,
				logger)
        {
            this.FakePackage = package;
            this.FakePackageManagementEvents = packageManagementEvents;
            this.FakeActionRunner = actionRunner;
            this.FakeLogger = logger;

            IsProjectPackageReturnsValue = true;
            IsProjectPackageIsCalled = false;

            IsProjectPackageAction = p => {
                IsProjectPackageIsCalled = true;
                return IsProjectPackageReturnsValue;
            };
        }
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:27,代码来源:TestablePackageViewModel.cs


示例3: CreateFakeSolution

        public void GetProjects_SolutionHasTwoProjectsAndNoProjectSelectedInProjectsBrowserAndPackageIsInstalledInFirstProject_ReturnsAllProjectsInSolutionWithIsSelectedIsTrue()
        {
            CreateFakeSolution();
            List<IProject> projectsAddedToSolution = AddSolutionWithTwoProjectsToProjectService();
            projectsAddedToSolution[0].Name = "Project A";
            projectsAddedToSolution[1].Name = "Project B";
            fakeSolution.FakeActiveProject = null;

            var fakePackage = new FakePackage("Test");
            var fakeProject = fakeSolution.AddFakeProjectToReturnFromGetProject("Project A");
            fakeProject.FakePackages.Add(fakePackage);
            fakeSolution.AddFakeProjectToReturnFromGetProject("Project B");

            CreateSelectedProjects();

            List<IPackageManagementSelectedProject> projects =
                selectedProjects.GetProjects(fakePackage).ToList();

            var expectedProjects = new List<IPackageManagementSelectedProject>();
            expectedProjects.Add(new FakeSelectedProject("Project A", selected: true));
            expectedProjects.Add(new FakeSelectedProject("Project B", selected: false));

            SelectedProjectCollectionAssert.AreEqual(expectedProjects, projects);
            Assert.AreEqual(fakePackage.FakePackageRepository, fakeSolution.RepositoryPassedToGetProject);
            Assert.AreEqual(projectsAddedToSolution, fakeSolution.ProjectsPassedToGetProject);
        }
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:26,代码来源:SelectedProjectsForInstalledPackagesTests.cs


示例4: AddFileToPackageBeingUninstalled

		void AddFileToPackageBeingUninstalled(string fileName)
		{
			var package = new FakePackage();
			package.AddFile(fileName);
			
			action.Package = package;
		}
开发者ID:nylen,项目名称:SharpDevelop,代码行数:7,代码来源:UninstallPackageActionTests.cs


示例5: AddPackageInstallOperation

		public FakePackage AddPackageInstallOperation()
		{
			var package = new FakePackage("Package to install");
			var operation = new PackageOperation(package, PackageAction.Install);
			PackageOperations.Add(operation);
			return package;
		}
开发者ID:hpsa,项目名称:SharpDevelop,代码行数:7,代码来源:InstallPackageHelper.cs


示例6: CreateNewActiveRepositoryWithDifferentPackages

		void CreateNewActiveRepositoryWithDifferentPackages()
		{
			var package = new FakePackage("NewRepositoryPackageId");
			var newRepository = new FakePackageRepository();
			newRepository.FakePackages.Add(package);
			packageManagementService.FakeActivePackageRepository = newRepository;
		}
开发者ID:kleinux,项目名称:SharpDevelop,代码行数:7,代码来源:AvailablePackagesViewModelTests.cs


示例7: CreateNewActiveRepositoryWithDifferentPackages

		void CreateNewActiveRepositoryWithDifferentPackages()
		{
			var package = new FakePackage("NewRepositoryPackageId");
			var newRepository = new FakePackageRepository();
			newRepository.FakePackages.Add(package);
			registeredPackageRepositories.FakeActiveRepository = newRepository;
		}
开发者ID:nylen,项目名称:SharpDevelop,代码行数:7,代码来源:AvailablePackagesViewModelTests.cs


示例8: AddOneFakeUninstallPackageOperation

		public PackageOperation AddOneFakeUninstallPackageOperation()
		{
			var package = new FakePackage("PackageToUninstall");			
			var operation = new PackageOperation(package, PackageAction.Uninstall);
			FakeSolution.FakeActiveProject.FakeInstallOperations.Add(operation);
			return operation;
		}
开发者ID:yuriykipnis,项目名称:SharpDevelop,代码行数:7,代码来源:TestablePackageViewModel.cs


示例9: CreateScript

		void CreateScript()
		{
			fakeScriptFileName = new FakePackageScriptFileName();
			fakeSession = new FakePackageScriptSession();
			fakePackage = new FakePackage();
			script = new PackageInitializeScript(fakePackage, fakeScriptFileName);
		}
开发者ID:Paccc,项目名称:SharpDevelop,代码行数:7,代码来源:PackageInitializeScriptTests.cs


示例10: CreateFakePackage

		FakePackage CreateFakePackage()
		{
			var package = new FakePackage();
			package.Id = "Test";
			package.Version = new Version(1, 0, 0, 0);
			return package;
		}
开发者ID:yuriykipnis,项目名称:SharpDevelop,代码行数:7,代码来源:SharpDevelopPackageManagerTests.cs


示例11: CreateFakeSolution

		public void GetProjects_SolutionHasTwoProjectsAndOneProjectSelectedInProjectsBrowserAndPackageIsInstalledInProject_ReturnsProjectAndIsSelectedIsTrue()
		{
			CreateFakeSolution();
			List<IProject> projectsAddedToSolution = AddSolutionWithTwoProjectsToProjectService();
			projectsAddedToSolution[0].Name = "Aaa";
			IProject msbuildProject = projectsAddedToSolution[1];
			msbuildProject.Name = "MyProject";
			fakeSolution.FakeActiveMSBuildProject = msbuildProject;
			
			var fakePackage = new FakePackage();
			var fakeProject = fakeSolution.AddFakeProjectToReturnFromGetProject("MyProject");
			fakeProject.FakePackages.Add(fakePackage);
			fakeSolution.AddFakeProjectToReturnFromGetProject("Aaa");

			CreateSelectedProjects();
			
			List<IPackageManagementSelectedProject> projects =
				selectedProjects.GetProjects(fakePackage).ToList();
			
			var expectedProject = new FakeSelectedProject("MyProject", selected: true);
			var expectedProjects = new List<IPackageManagementSelectedProject>();
			expectedProjects.Add(expectedProject);
			
			SelectedProjectCollectionAssert.AreEqual(expectedProjects, projects);
			Assert.AreEqual(fakePackage.FakePackageRepository, fakeSolution.RepositoryPassedToGetProject);
			Assert.AreEqual(msbuildProject, fakeSolution.ProjectPassedToGetProject);
		}
开发者ID:hpsa,项目名称:SharpDevelop,代码行数:27,代码来源:SelectedProjectsForInstalledPackagesTests.cs


示例12: AddPackage

 IPackage AddPackage(string id, string version, string installPath)
 {
     var package = new FakePackage(id, version);
     installedPackages.Add(package);
     fakeSolution.Stub(s => s.GetInstallPath(package)).Return(installPath);
     return package;
 }
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:7,代码来源:VsPackageInstallerServicesTests.cs


示例13: AddPackageToRecentPackageRepository

		FakePackage AddPackageToRecentPackageRepository()
		{
			var package = new FakePackage("Test");
			FakePackageRepository repository = registeredPackageRepositories.FakeRecentPackageRepository;
			repository.FakePackages.Add(package);
			return package;
		}
开发者ID:Rpinski,项目名称:SharpDevelop,代码行数:7,代码来源:RecentPackagesViewModelTests.cs


示例14: CreateViewModel

		void CreateViewModel()
		{
			viewModel = new TestableInstalledPackageViewModel();
			fakeSolution = viewModel.FakeSolution;
			fakeActionRunner = viewModel.FakeActionRunner;
			fakePackage = viewModel.FakePackage;
			fakePackageManagementEvents = viewModel.FakePackageManagementEvents;
		}
开发者ID:nylen,项目名称:SharpDevelop,代码行数:8,代码来源:InstalledPackageViewModelTests.cs


示例15: AddPackageReference

		public override void AddPackageReference(string packageId, Version version, bool ignoreDependencies)
		{
			var package = new FakePackage();
			package.Id = packageId;
			package.Version = version;
			PackagePassedToAddPackageReference = package;
			IgnoreDependenciesPassedToAddPackageReference = ignoreDependencies;
		}
开发者ID:hpsa,项目名称:SharpDevelop,代码行数:8,代码来源:TestableProjectManager.cs


示例16: UpdatePackageReference

		public override void UpdatePackageReference(string packageId, Version version, bool updateDependencies)
		{
			var package = new FakePackage();
			package.Id = packageId;
			package.Version = version;
			
			PackagePassedToUpdatePackageReference = package;
			UpdateDependenciesPassedToUpdatePackageReference = updateDependencies;
		}
开发者ID:hpsa,项目名称:SharpDevelop,代码行数:9,代码来源:TestableProjectManager.cs


示例17: CreatePackageWithVersion

		public static FakePackage CreatePackageWithVersion(string id, string version)
		{
			var package = new FakePackage() {
				Id = id,
				Description = String.Empty,
				Version = new Version(version)
			};
			return package;
		}
开发者ID:eusebiu,项目名称:SharpDevelop,代码行数:9,代码来源:FakePackage.cs


示例18: CreateRepositoryWithOneRecentPackageSavedInOptions

		FakePackage CreateRepositoryWithOneRecentPackageSavedInOptions()
		{
			CreateRecentPackages();
			var package = new FakePackage("Test");
			aggregateRepository.FakePackages.Add(package);
			recentPackages.Add(new RecentPackageInfo(package));
			CreateRepository(recentPackages);
			return package;
		}
开发者ID:nylen,项目名称:SharpDevelop,代码行数:9,代码来源:RecentPackageRepositoryTests.cs


示例19: CreateRepositoryWithOneRecentPackageSavedInOptions

		FakePackage CreateRepositoryWithOneRecentPackageSavedInOptions()
		{
			CreatePackageManagementService();
			var package = new FakePackage("Test");
			aggregateRepository.FakePackages.Add(package);
			options.RecentPackages.Add(new RecentPackageInfo(package));
			CreateRepository(packageManagementService);
			return package;
		}
开发者ID:AdamLStevenson,项目名称:SharpDevelop,代码行数:9,代码来源:RecentPackageRepositoryTests.cs


示例20: CreatePackage

		FakePackage CreatePackage(string version)
		{
			var package = new FakePackage() {
				Id = "Test",
				Description = String.Empty,
				Version = new Version(version)
			};
			return package;
		}
开发者ID:kleinux,项目名称:SharpDevelop,代码行数:9,代码来源:PackageUpdatesViewModelTests.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Design.FakePackageManagementProject类代码示例发布时间:2022-05-26
下一篇:
C# TypeSystem.ParameterizedType类代码示例发布时间: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