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

C# Helpers.FakePackage类代码示例

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

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



FakePackage类属于MonoDevelop.PackageManagement.Tests.Helpers命名空间,在下文中一共展示了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:FreeBSD-DotNet,项目名称:monodevelop,代码行数:7,代码来源:PackageOperationHelper.cs


示例2: CreatePackageFilesWithTwoFiles

		void CreatePackageFilesWithTwoFiles (string fileName1, string fileName2)
		{
			var package = new FakePackage ();
			package.AddFile (fileName1);
			package.AddFile (fileName2);
			CreatePackageFiles (package);
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:7,代码来源:PackageFilesTests.cs


示例3: AddOneFakeUninstallPackageOperation

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


示例4: AddPackageInstallOperation

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


示例5: AddFileToPackageBeingUninstalled

		void AddFileToPackageBeingUninstalled (string fileName)
		{
			var package = new FakePackage ();
			package.AddFile (fileName);

			action.Package = package;
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:7,代码来源:UninstallPackageActionTests.cs


示例6: PackageWithMSBuildTargetsIsRestored

		void PackageWithMSBuildTargetsIsRestored ()
		{
			var package = new FakePackage ("MyPackage");
			package.AddFile (@"build\MyPackage.targets");

			packageEvents.OnPackageRestored (package);
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:7,代码来源:MSBuildTargetsRestoredMonitorTests.cs


示例7: AddPackageReference

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


示例8: CreateRepositoryWithOneRecentPackageSavedInOptions

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


示例9: CreateViewModel

		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;
		}
开发者ID:alexrp,项目名称:monodevelop,代码行数:10,代码来源:PackageViewModelTests.cs


示例10: AddInstallOperationWithFile

		void AddInstallOperationWithFile (string fileName)
		{
			var package = new FakePackage ();
			package.AddFile (fileName);

			var operation = new PackageOperation (package, PackageAction.Install);
			var operations = new List<PackageOperation> ();
			operations.Add (operation);

			action.Operations = operations;
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:11,代码来源:UpdatePackageActionTests.cs


示例11: IsMatch_PackageWithDifferentIdButSameVersionPassed_ReturnsFalse

		public void IsMatch_PackageWithDifferentIdButSameVersionPassed_ReturnsFalse ()
		{
			var version = new SemanticVersion (1, 0, 0, 0);
			var recentPackageInfo = new RecentPackageInfo ("id", version);
			var package = new FakePackage ("different-id");
			package.Version = version;

			bool result = recentPackageInfo.IsMatch (package);

			Assert.IsFalse (result);
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:11,代码来源:RecentPackageInfoTests.cs


示例12: IsMatch_PackageWithSameIdButDifferentVersionPassed_ReturnsFalse

		public void IsMatch_PackageWithSameIdButDifferentVersionPassed_ReturnsFalse ()
		{
			string id = "id";
			var version = new SemanticVersion (1, 0, 0, 0);
			var recentPackageInfo = new RecentPackageInfo (id, version);
			var package = new FakePackage (id);
			package.Version = new SemanticVersion (2, 0, 0, 0);

			bool result = recentPackageInfo.IsMatch (package);

			Assert.IsFalse (result);
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:12,代码来源:RecentPackageInfoTests.cs


示例13: Init

		void Init ()
		{
			string config = 
				"<root>\r\n" +
				"    <package id='Test' version='1.0.0.0'/>\r\n" +
				"</root>";

			FakeProjectSystem.FileExistsReturnValue = true;
			FakeProjectSystem.FileToReturnFromOpenFile = config;

			FakePackage package = new FakePackage ("Test", "1.0.0.0");

			FakeSharedSourceRepository.FakePackages.Add (package);
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:14,代码来源:PackageReferenceRepositoryHelper.cs


示例14: CheckForUpdates_OnePackageUpdated_OneUpdatedPackageFoundForProject

		public void CheckForUpdates_OnePackageUpdated_OneUpdatedPackageFoundForProject ()
		{
			CreateUpdatedPackagesInSolution ();
			FakePackageManagementProject project = AddProjectToSolution ();
			project.AddPackageReference ("MyPackage", "1.0");
			FakePackage updatedPackage = AddUpdatedPackageToAggregateSourceRepository ("MyPackage", "1.1");
			var expectedPackages = new FakePackage [] { updatedPackage };

			updatedPackagesInSolution.CheckForUpdates ();
			UpdatedPackagesInProject updatedPackages = updatedPackagesInSolution.GetUpdatedPackages (project.Project);

			Assert.AreEqual (project.Project, updatedPackages.Project);
			Assert.IsNotNull (updatedPackages.Project);
			CollectionAssert.AreEqual (expectedPackages, updatedPackages.GetPackages ());
		}
开发者ID:brantwedel,项目名称:monodevelop,代码行数:15,代码来源:UpdatedPackagesInSolutionTests.cs


示例15: TestablePackageViewModel

		public TestablePackageViewModel (
			IPackageViewModelParent parent,
			FakePackage package,
			PackageManagementSelectedProjects selectedProjects,
			PackageManagementEvents packageManagementEvents,
			FakeLogger logger)
			: base (
				parent,
				package,
				selectedProjects,
				packageManagementEvents,
				null,
				logger)
		{
			this.FakePackage = package;
			this.PackageManagementEvents = packageManagementEvents;
			this.FakeLogger = logger;
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:18,代码来源:TestablePackageViewModel.cs


示例16: AddPackageInReverseDependencyOrderToSolution

		FakePackage AddPackageInReverseDependencyOrderToSolution (string packageId)
		{
			var package = new FakePackage (packageId);
			fakeSolutionPackageRepository.FakePackagesByReverseDependencyOrder.Add (package);
			return package;
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:6,代码来源:PackageManagementSolutionTests.cs


示例17: GetPackages_OnePackageInstalledIntoPackagesFolderOnly_ReturnsNoPackages

		public void GetPackages_OnePackageInstalledIntoPackagesFolderOnly_ReturnsNoPackages ()
		{
			CreateSolution ();
			fakeProjectService.CurrentProject = null;
			FakePackage fakePackage = FakePackage.CreatePackageWithVersion ("One", "1.0");
			fakeSolutionPackageRepository.FakeSharedRepository.FakePackages.Add (fakePackage);

			IQueryable<IPackage> packages = solution.GetPackages ();

			var expectedPackages = new FakePackage [0];
			Assert.AreEqual (expectedPackages, packages);
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:12,代码来源:PackageManagementSolutionTests.cs


示例18: CreateSolution

		public void GetPackages_OnePackageInstalledIntoOneProjectButTwoPackagesInSolutionRepository_ReturnsOnlyOneProjectPackage ()
		{
			CreateSolution ();
			fakeProjectService.CurrentProject = null;
			AddProjectToOpenProjects ("Test");
			var project = new FakePackageManagementProject ();
			fakeProjectFactory.CreatePackageManagementProject = (repository, msbuildProject) => {
				return project;
			};
			FakePackage installedSolutionPackage = FakePackage.CreatePackageWithVersion ("SolutionPackage", "1.0.0.0");
			fakeSolutionPackageRepository.FakeSharedRepository.FakePackages.Add (installedSolutionPackage);
			FakePackage installedProjectPackage = FakePackage.CreatePackageWithVersion ("ProjectPackage", "1.0.0.0");
			fakeSolutionPackageRepository.FakeSharedRepository.FakePackages.Add (installedProjectPackage);
			project.FakePackages.Add (installedProjectPackage);

			IQueryable<IPackage> packages = solution.GetPackages ();

			var expectedPackages = new FakePackage[] {
				installedProjectPackage
			};

			Assert.AreEqual (expectedPackages, packages);
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:23,代码来源:PackageManagementSolutionTests.cs


示例19: CreatePackageWithSummary

		void CreatePackageWithSummary (string summary)
		{
			package = new FakePackage { Summary = summary };
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:4,代码来源:IPackageExtensionsTests.cs


示例20: ParentPackagesUpdated_UnsafeEventFiredAndInvokeRequired_ThreadSafeEventIsSafelyInvoked

		public void ParentPackagesUpdated_UnsafeEventFiredAndInvokeRequired_ThreadSafeEventIsSafelyInvoked ()
		{
			CreateEvents ();
			threadSafeEvents.ParentPackagesUpdated += OnEventHandlerFired;
			var expectedPackages = new FakePackage[] { new FakePackage () };

			unsafeEvents.OnParentPackagesUpdated (expectedPackages);

			Assert.IsTrue (isGuiSyncDispatchCalled);
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:10,代码来源:ThreadSafePackageManagementEventsTests.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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