本文整理汇总了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());
}
示例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;
}
示例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);
}
示例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;
}
示例5: CreateSolution
void CreateSolution(params IProject[] projects)
{
solution = MockRepository.GenerateStrictMock<ISolution>();
solution.Stub(s => s.Projects).Return(new SimpleModelCollection<IProject>(projects));
}
示例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)));
}