TestableProject CreateProjectReference()
		{
			project = new TestableDTEProject();
			msbuildProject = project.TestableProject;
			TestableProject referencedProject = ProjectHelper.CreateTestProject();
			ProjectReferenceProjectItem referenceProjectItem = msbuildProject.AddProjectReference(referencedProject);
			fakeProjectService = project.FakeProjectService;
			CreateReference(project, referenceProjectItem);
			return referencedProject;
		}
示例#2
0
		TestableProject CreateProjectReference(string parentProjectFileName, string referencedProjectFileName)
		{
			project = new TestableDTEProject();
			msbuildProject = project.TestableProject;
			msbuildProject.FileName = new FileName(parentProjectFileName);
			TestableProject referencedProject = ProjectHelper.CreateTestProject();
			referencedProject.FileName = new FileName(referencedProjectFileName);
			((ICollection<IProject>)msbuildProject.ParentSolution.Projects).Add(referencedProject);
			IWorkbench workbench = MockRepository.GenerateStub<IWorkbench>();
			ICSharpCode.SharpDevelop.SD.Services.AddService(typeof(IWorkbench), workbench);
			ProjectReferenceProjectItem referenceProjectItem = msbuildProject.AddProjectReference(referencedProject);
			fakeProjectService = project.FakeProjectService;
			CreateReference(project, referenceProjectItem);
			return referencedProject;
		}