Exemple #1
0
 public ServiceReferenceGenerator(
     IProjectWithServiceReferences project,
     IServiceReferenceFileGenerator fileGenerator,
     IFileSystem fileSystem,
     IActiveTextEditors activeTextEditors)
 {
     this.project           = project;
     this.fileGenerator     = fileGenerator;
     this.fileSystem        = fileSystem;
     this.activeTextEditors = activeTextEditors;
 }
		public ServiceReferenceGenerator(
			IProjectWithServiceReferences project,
			IServiceReferenceFileGenerator fileGenerator,
			IFileSystem fileSystem,
			IActiveTextEditors activeTextEditors)
		{
			this.project = project;
			this.fileGenerator = fileGenerator;
			this.fileSystem = fileSystem;
			this.activeTextEditors = activeTextEditors;
		}
		void CreateGenerator()
		{
			options = new ServiceReferenceGeneratorOptions();
			fakeProject = MockRepository.GenerateStub<IProjectWithServiceReferences>();
			projectReferences = new List<ReferenceProjectItem>();
			fakeProject.Stub(p => p.GetReferences()).Return(projectReferences);
			fakeProxyGenerator = MockRepository.GenerateStub<IServiceReferenceProxyGenerator>();
			fakeProxyGenerator.Options = options;
			fakeReferenceMapGenerator = MockRepository.GenerateStub<IServiceReferenceMapGenerator>();
			fileGenerator = new ServiceReferenceFileGenerator(fakeProxyGenerator, fakeReferenceMapGenerator);
			fakeFileSystem = MockRepository.GenerateStub<IServiceReferenceFileSystem>();
			fakeActiveTextEditors = MockRepository.GenerateStub<IActiveTextEditors>();
			
			generator = new ServiceReferenceGenerator(fakeProject, fileGenerator, fakeFileSystem, fakeActiveTextEditors);
		}
        void CreateGenerator()
        {
            options           = new ServiceReferenceGeneratorOptions();
            fakeProject       = MockRepository.GenerateStub <IProjectWithServiceReferences>();
            projectReferences = new List <ReferenceProjectItem>();
            fakeProject.Stub(p => p.GetReferences()).Return(projectReferences);
            fakeProxyGenerator         = MockRepository.GenerateStub <IServiceReferenceProxyGenerator>();
            fakeProxyGenerator.Options = options;
            fakeReferenceMapGenerator  = MockRepository.GenerateStub <IServiceReferenceMapGenerator>();
            fileGenerator         = new ServiceReferenceFileGenerator(fakeProxyGenerator, fakeReferenceMapGenerator);
            fakeFileSystem        = MockRepository.GenerateStub <IServiceReferenceFileSystem>();
            fakeActiveTextEditors = MockRepository.GenerateStub <IActiveTextEditors>();

            generator = new ServiceReferenceGenerator(fakeProject, fileGenerator, fakeFileSystem, fakeActiveTextEditors);
        }