本文整理汇总了C#中IProject.Stub方法的典型用法代码示例。如果您正苦于以下问题:C# IProject.Stub方法的具体用法?C# IProject.Stub怎么用?C# IProject.Stub使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IProject
的用法示例。
在下文中一共展示了IProject.Stub方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FixtureSetUp
public override void FixtureSetUp()
{
base.FixtureSetUp();
project = MockRepository.GenerateStrictMock<IProject>();
project.Stub(p => p.FileName).Return(FileName.Create(@"C:\Projects\MyProject\MyProject.csproj"));
project.Stub(p => p.Directory).Return(DirectoryName.Create(@"C:\Projects\MyProject"));
project.Stub(p => p.OutputAssemblyFullPath).Return(FileName.Create(@"C:\Projects\MyProject\bin\Debug\MyProject.exe"));
project.Stub(p => p.Name).Return("MyProject");
var projectService = MockRepository.GenerateStrictMock<IProjectService>();
projectService.Stub(p => p.CurrentProject).Return(project);
SD.Services.AddService(typeof(IProjectService), projectService);
tagProvider = new SharpDevelopStringTagProvider();
}
示例2: Init
public void Init()
{
testFramework = new MSTestFramework();
fakeProject = MockRepository.GenerateStub<IProject>();
fakeProject.Stub(p => p.SyncRoot).Return(fakeProject);
}
示例3: SetUp
public virtual void SetUp()
{
SD.InitializeForUnitTests();
project = MockRepository.GenerateStrictMock<IProject>();
project.Stub(p => p.RootNamespace).Return("RootNamespace");
testProject = new NUnitTestProject(project);
projectContent = new CSharpProjectContent().AddAssemblyReferences(NRefactoryHelper.Corlib, NRefactoryHelper.NUnitFramework);
SD.Services.AddStrictMockService<IParserService>();
SD.ParserService.Stub(p => p.GetCompilation(project)).WhenCalled(m => m.ReturnValue = projectContent.CreateCompilation());
}
示例4: CreateProject
void CreateProject()
{
projectSpecificProperties = new Properties();
project = MockRepository.GenerateStub<IProject>();
project.Stub(p => p.Preferences).Return(projectSpecificProperties);
}