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


C# ISolution.Stub方法代码示例

本文整理汇总了C#中ISolution.Stub方法的典型用法代码示例。如果您正苦于以下问题:C# ISolution.Stub方法的具体用法?C# ISolution.Stub怎么用?C# ISolution.Stub使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ISolution的用法示例。


在下文中一共展示了ISolution.Stub方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateSolution

		void CreateSolution(string fileName)
		{
			solution = MockRepository.GenerateStrictMock<ISolution>();
			var file = FileName.Create(fileName);
			solution.Stub(s => s.FileName).Return(file);
			solution.Stub(s => s.Directory).Return(file.GetParentDirectory());
		}
开发者ID:Paccc,项目名称:SharpDevelop,代码行数:7,代码来源:SolutionPackageRepositoryPathTests.cs

示例2: TestableInvokeUpdateWorkingDirectoryCmdlet

        public TestableInvokeUpdateWorkingDirectoryCmdlet(
			string solutionFileName,
			FakePackageManagementProjectService projectService,
			FakePackageManagementConsoleHost consoleHost,
			FakeCmdletTerminatingError cmdletTerminatingError)
            : base(projectService, consoleHost, cmdletTerminatingError)
        {
            this.FakeProjectService = projectService;
            this.FakePackageManagementConsoleHost = consoleHost;
            this.FakeCmdletTerminatingError = cmdletTerminatingError;

            Solution = MockRepository.GenerateStub<ISolution>();
            var fileName = new FileName(solutionFileName);
            Solution.Stub(s => s.Directory).Return(fileName.GetParentDirectory());
            Solution.Stub(s => s.FileName).Return(fileName);
            projectService.OpenSolution = Solution;
        }
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:17,代码来源:TestableInvokeUpdateWorkingDirectoryCmdlet.cs

示例3: OpenSolution

		void OpenSolution(string fileName)
		{
			fakeSolution = MockRepository.GenerateStub<ISolution>();
			var sections = new SimpleModelCollection<SolutionSection>(new SolutionSection[0]);
			fakeSolution.Stub(s => s.GlobalSections).Return(sections);
			fakeProjectService.OpenSolution = fakeSolution;
			SetOpenSolutionFileName(fileName);
		}
开发者ID:Paccc,项目名称:SharpDevelop,代码行数:8,代码来源:DTETests.cs

示例4: TestableInvokeInitializePackagesCmdlet

		public TestableInvokeInitializePackagesCmdlet(
			FakePackageManagementProjectService projectService,
			FakePackageInitializationScriptsFactory scriptsFactory,
			FakePackageManagementConsoleHost consoleHost,
			FakeCmdletTerminatingError cmdletTerminatingError)
			: base(projectService, scriptsFactory, consoleHost, cmdletTerminatingError)
		{
			this.FakeProjectService = projectService;
			this.FakeScriptsFactory = scriptsFactory;
			this.FakePackageManagementConsoleHost = consoleHost;
			this.FakeCmdletTerminatingError = cmdletTerminatingError;
			
			Solution = MockRepository.GenerateStub<ISolution>();
			Solution.Stub(s => s.FileName).Return(new FileName(@"d:\projects\MyProject\MyProject.sln"));
			projectService.OpenSolution = Solution;
		}
开发者ID:Paccc,项目名称:SharpDevelop,代码行数:16,代码来源:TestableInvokeInitializePackagesCmdlet.cs

示例5: CreateSolution

		void CreateSolution(params IProject[] projects)
		{
			solution = MockRepository.GenerateStrictMock<ISolution>();
			solution.Stub(s => s.Projects).Return(new SimpleModelCollection<IProject>(projects));
		}
开发者ID:Rew,项目名称:SharpDevelop,代码行数:5,代码来源:BeforeBuildCustomToolProjectItemsTests.cs

示例6: CreateSolution

		void CreateSolution(string fileName)
		{
			solution = MockRepository.GenerateStrictMock<ISolution>();
			solution.Stub(s => s.FileName).Return(FileName.Create(fileName));
			solution.Stub(s => s.Directory).Return(DirectoryName.Create(System.IO.Path.GetDirectoryName(fileName)));
		}
开发者ID:Paccc,项目名称:SharpDevelop,代码行数:6,代码来源:SolutionPackageRepositoryTests.cs


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