void CreateOpenMSBuildProjects()
		{
			fakeProjectService = MockRepository.GenerateStub<IPackageManagementProjectService>();
			openProjects = new SimpleModelCollection<IProject>();
			fakeProjectService.Stub(service => service.AllProjects).Return(openProjects);
			
			projects = new OpenMSBuildProjects(fakeProjectService);
		}
Пример #2
0
		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);
		}
		public AssemblyReferencesTreeNode(IAssemblyModel assemblyModel)
		{
			if (assemblyModel == null)
				throw new ArgumentNullException("assemblyModel");
			this.assemblyModel = assemblyModel;
			this.text = SD.ResourceService.GetString("ICSharpCode.SharpDevelop.Commands.ProjectBrowser.ReferencesNodeText");
			references = new SimpleModelCollection<IAssemblyModel>();
			UpdateReferences();
		}
Пример #4
0
		public BaseTypesTreeNode(ITypeDefinitionModel definition)
		{
			if (definition == null)
				throw new ArgumentNullException("definition");
			this.definition = definition;
			this.definition.Updated += (sender, e) => UpdateBaseTypes();
			this.text = SD.ResourceService.GetString("MainWindow.Windows.ClassBrowser.BaseTypes");
			baseTypes = new SimpleModelCollection<ITypeDefinitionModel>();
			childrenLoaded = false;
		}
Пример #5
0
		SD.ISolution CreateSharpDevelopSolution(string fileName = @"d:\projects\MyProject\MyProject.sln")
		{
			var solution = MockRepository.GenerateStub<ISolution>();
			var solutionFileName = new FileName(fileName);
			solution.Stub(s => s.FileName).Return(solutionFileName);
			solution.Stub(s => s.Directory).Return(solutionFileName.GetParentDirectory());
			
			var sections = new SimpleModelCollection<SolutionSection>(new SolutionSection[0]);
			solution.Stub(s => s.GlobalSections).Return(sections);
			
			solution.Stub(s => s.MSBuildProjectCollection).Return(new ProjectCollection());
			
			var projects = new SimpleModelCollection<IProject>();
			solution.Stub(s =>s.Projects).Return(projects);
			
			return solution;
		}