Beispiel #1
0
 public SiteTreeGeneratorService(ILogger logger, ITypeResolver typeResolver, IParsedSourceStorageService cache, IParserFactory parserFactory)
 {
     _logger        = logger;
     _typeResolver  = typeResolver;
     _cache         = cache;
     _parserFactory = parserFactory;
 }
		public void Setup()
		{
			ccu = new CodeCompileUnit();
			mocks = new MockRepository();
			engine = Engine.GlobalEngine;
			engine.BinPath = @"C:\Program Files (x86)\MSBuild";
			project = new Project();
			buildEngine = mocks.DynamicMock<MockBuildEngine>(project);

			logger = new NullLogger();
			parserService = mocks.DynamicMock<ISiteTreeGeneratorService>();
			naming = mocks.DynamicMock<INamingService>();
			sourceStorage = mocks.DynamicMock<IParsedSourceStorageService>();
			source = mocks.DynamicMock<ISourceGenerator>();
			typeResolver = mocks.DynamicMock<ITypeResolver>();
			treeService = mocks.DynamicMock<ITreeCreationService>();
			viewSourceMapper = mocks.DynamicMock<IViewSourceMapper>();
			generator = mocks.DynamicMock<IGenerator>();

			task = new GenerateMonoRailSiteTreeTask(logger, parserService, naming, source, sourceStorage, typeResolver,
			                                         treeService, viewSourceMapper, generator);

			item = mocks.DynamicMock<ITaskItem>();
			parsedSource = mocks.DynamicMock<IParser>();
		}
Beispiel #3
0
        public void Setup()
        {
            ccu            = new CodeCompileUnit();
            mocks          = new MockRepository();
            engine         = Engine.GlobalEngine;
            engine.BinPath = @"C:\Program Files (x86)\MSBuild";
            project        = new Project();
            buildEngine    = mocks.DynamicMock <MockBuildEngine>(project);

            logger           = new NullLogger();
            parserService    = mocks.DynamicMock <ISiteTreeGeneratorService>();
            naming           = mocks.DynamicMock <INamingService>();
            sourceStorage    = mocks.DynamicMock <IParsedSourceStorageService>();
            source           = mocks.DynamicMock <ISourceGenerator>();
            typeResolver     = mocks.DynamicMock <ITypeResolver>();
            treeService      = mocks.DynamicMock <ITreeCreationService>();
            viewSourceMapper = mocks.DynamicMock <IViewSourceMapper>();
            generator        = mocks.DynamicMock <IGenerator>();

            task = new GenerateMonoRailSiteTreeTask(logger, parserService, naming, source, sourceStorage, typeResolver,
                                                    treeService, viewSourceMapper, generator);

            item         = mocks.DynamicMock <ITaskItem>();
            parsedSource = mocks.DynamicMock <IParser>();
        }
 public SiteTreeGeneratorService(ILogger logger, ITypeResolver typeResolver, IParsedSourceStorageService cache,  IParserFactory parserFactory)
 {
   _logger = logger;
   _typeResolver = typeResolver;
   _cache = cache;
   _parserFactory = parserFactory;
 }
Beispiel #5
0
 public GenerateMonoRailSiteTreeTask()
 {
     _logger              = new MsBuildLogger(this.Log);
     _naming              = new DefaultNamingService();
     _treeService         = new DefaultTreeCreationService();
     _source              = new DefaultSourceGenerator();
     _viewSourceMapper    = new ViewSourceMapper(_logger, _treeService, _naming);
     _sourceStorage       = new DefaultSourceStorageService();
     _typeResolver        = new TypeResolver();
     _service             = new SiteTreeGeneratorService(_logger, _typeResolver, _sourceStorage, new NRefactoryParserFactory());
     this.ServiceTypeName = typeof(ICodeGeneratorServices).FullName;
 }
		public void Setup()
		{
			mocks = new MockRepository();
			logger = new NullLogger();
			typeResolver = mocks.DynamicMock<ITypeResolver>();
			visitor = mocks.DynamicMock<IAstVisitor>();
			sources = mocks.DynamicMock<IParsedSourceStorageService>();
			parserFactory = mocks.DynamicMock<IParserFactory>();
			parser = mocks.DynamicMock<IParser>();
			service = new SiteTreeGeneratorService(logger, typeResolver, sources, parserFactory);
			path = "~~TemporarySource.cs";
			WriteSampleSource(path);
		}
Beispiel #7
0
 public void Setup()
 {
     _mocks         = new MockRepository();
     _logger        = new NullLogger();
     _typeResolver  = _mocks.DynamicMock <ITypeResolver>();
     _visitor       = _mocks.DynamicMock <IAstVisitor>();
     _sources       = _mocks.DynamicMock <IParsedSourceStorageService>();
     _parserFactory = _mocks.DynamicMock <IParserFactory>();
     _parser        = _mocks.DynamicMock <IParser>();
     _service       = new SiteTreeGeneratorService(_logger, _typeResolver, _sources, _parserFactory);
     _path          = "~~TemporarySource.cs";
     WriteSampleSource(_path);
 }
Beispiel #8
0
 public GenerateMonoRailSiteTreeTask(ILogger logger, ISiteTreeGeneratorService service, INamingService naming, ISourceGenerator source, IParsedSourceStorageService sourceStorage, ITypeResolver typeResolver, ITreeCreationService treeService, IViewSourceMapper viewSourceMapper, IGenerator generator)
 {
     _service          = service;
     _logger           = logger;
     _naming           = naming;
     _source           = source;
     _sourceStorage    = sourceStorage;
     _typeResolver     = typeResolver;
     _treeService      = treeService;
     _viewSourceMapper = viewSourceMapper;
     _generators.Add(generator);
     this.ServiceTypeName = typeof(ICodeGeneratorServices).FullName;
 }
Beispiel #9
0
 public void Setup()
 {
     mocks         = new MockRepository();
     logger        = new NullLogger();
     typeResolver  = mocks.DynamicMock <ITypeResolver>();
     visitor       = mocks.DynamicMock <IAstVisitor>();
     sources       = mocks.DynamicMock <IParsedSourceStorageService>();
     parserFactory = mocks.DynamicMock <IParserFactory>();
     parser        = mocks.DynamicMock <IParser>();
     service       = new SiteTreeGeneratorService(logger, typeResolver, sources, parserFactory);
     path          = "~~TemporarySource.cs";
     WriteSampleSource(path);
 }
 public void Setup()
 {
   _mocks = new MockRepository();
   _logger = new NullLogger();
   _typeResolver = _mocks.DynamicMock<ITypeResolver>();
   _visitor = _mocks.DynamicMock<IAstVisitor>();
   _sources = _mocks.DynamicMock<IParsedSourceStorageService>();
   _parserFactory = _mocks.DynamicMock<IParserFactory>();
   _parser = _mocks.DynamicMock<IParser>();
   _service = new SiteTreeGeneratorService(_logger, _typeResolver, _sources, _parserFactory);
   _path = "~~TemporarySource.cs";
   WriteSampleSource(_path);
 }
		public GenerateMonoRailSiteTreeTask()
		{
			logger = new MsBuildLogger(Log);
			naming = new DefaultNamingService();
			treeService = new DefaultTreeCreationService();
			source = new DefaultSourceGenerator();
			viewSourceMapper = new ViewSourceMapper(logger, treeService);
			sourceStorage = new DefaultSourceStorageService();
			typeResolver = new TypeResolver();
			service = new SiteTreeGeneratorService(logger, typeResolver, sourceStorage, new NRefactoryParserFactory());
			ServiceTypeName = typeof(ICodeGeneratorServices).FullName;
			ViewComponentSources = new ITaskItem[0];
			AssemblyReferences = new ITaskItem[0];
		}
Beispiel #12
0
 public GenerateMonoRailSiteTreeTask()
 {
     logger               = new MsBuildLogger(Log);
     naming               = new DefaultNamingService();
     treeService          = new DefaultTreeCreationService();
     source               = new DefaultSourceGenerator();
     viewSourceMapper     = new ViewSourceMapper(logger, treeService);
     sourceStorage        = new DefaultSourceStorageService();
     typeResolver         = new TypeResolver();
     service              = new SiteTreeGeneratorService(logger, typeResolver, sourceStorage, new NRefactoryParserFactory());
     ServiceTypeName      = typeof(ICodeGeneratorServices).FullName;
     ViewComponentSources = new ITaskItem[0];
     AssemblyReferences   = new ITaskItem[0];
 }
		public GenerateMonoRailSiteTreeTask(ILogger logger, ISiteTreeGeneratorService service, INamingService naming,
											ISourceGenerator source, IParsedSourceStorageService sourceStorage,
											ITypeResolver typeResolver, ITreeCreationService treeService,
											IViewSourceMapper viewSourceMapper, IGenerator generator)
		{
			this.service = service;
			this.logger = logger;
			this.naming = naming;
			this.source = source;
			this.sourceStorage = sourceStorage;
			this.typeResolver = typeResolver;
			this.treeService = treeService;
			this.viewSourceMapper = viewSourceMapper;
			generators.Add(generator);
			ServiceTypeName = typeof(ICodeGeneratorServices).FullName;
			ViewComponentSources = new ITaskItem[0];
			AssemblyReferences = new ITaskItem[0];
		}
Beispiel #14
0
 public GenerateMonoRailSiteTreeTask(ILogger logger, ISiteTreeGeneratorService service, INamingService naming,
                                     ISourceGenerator source, IParsedSourceStorageService sourceStorage,
                                     ITypeResolver typeResolver, ITreeCreationService treeService,
                                     IViewSourceMapper viewSourceMapper, IGenerator generator)
 {
     this.service          = service;
     this.logger           = logger;
     this.naming           = naming;
     this.source           = source;
     this.sourceStorage    = sourceStorage;
     this.typeResolver     = typeResolver;
     this.treeService      = treeService;
     this.viewSourceMapper = viewSourceMapper;
     generators.Add(generator);
     ServiceTypeName      = typeof(ICodeGeneratorServices).FullName;
     ViewComponentSources = new ITaskItem[0];
     AssemblyReferences   = new ITaskItem[0];
 }
Beispiel #15
0
        public void Setup()
        {
            _ccu            = new CodeCompileUnit();
            _mocks          = new MockRepository();
            _engine         = Engine.GlobalEngine;
            _engine.BinPath = @"C:\Program Files (x86)\MSBuild";
            _project        = new Project();
            _buildEngine    = _mocks.DynamicMock <MockBuildEngine>(_project);

            _logger           = new NullLogger();
            _parserService    = _mocks.DynamicMock <ISiteTreeGeneratorService>();
            _naming           = _mocks.DynamicMock <INamingService>();
            _sourceStorage    = _mocks.DynamicMock <IParsedSourceStorageService>();
            _source           = _mocks.DynamicMock <ISourceGenerator>();
            _typeResolver     = _mocks.DynamicMock <ITypeResolver>();
            _treeService      = _mocks.DynamicMock <ITreeCreationService>();
            _viewSourceMapper = _mocks.DynamicMock <IViewSourceMapper>();
            _generator        = _mocks.DynamicMock <IGenerator>();

            _task = new GenerateMonoRailSiteTreeTask(_logger, _parserService, _naming, _source, _sourceStorage, _typeResolver, _treeService, _viewSourceMapper, _generator);

            _item         = _mocks.DynamicMock <ITaskItem>();
            _parsedSource = _mocks.DynamicMock <IParser>();
        }
 public GenerateMonoRailSiteTreeTask(ILogger logger, ISiteTreeGeneratorService service, INamingService naming, ISourceGenerator source, IParsedSourceStorageService sourceStorage, ITypeResolver typeResolver, ITreeCreationService treeService, IViewSourceMapper viewSourceMapper, IGenerator generator)
 {
     _service = service;
     _logger = logger;
     _naming = naming;
     _source = source;
     _sourceStorage = sourceStorage;
     _typeResolver = typeResolver;
     _treeService = treeService;
     _viewSourceMapper = viewSourceMapper;
     _generators.Add(generator);
     this.ServiceTypeName = typeof(ICodeGeneratorServices).FullName;
 }
    public void Setup()
    {
      _ccu = new CodeCompileUnit();
      _mocks = new MockRepository();
      _engine = Engine.GlobalEngine;
      _engine.BinPath = @"C:\Program Files (x86)\MSBuild";
      _project = new Project();
      _buildEngine = _mocks.DynamicMock<MockBuildEngine>(_project);

      _logger = new NullLogger();
      _parserService = _mocks.DynamicMock<ISiteTreeGeneratorService>();
      _naming = _mocks.DynamicMock<INamingService>();
      _sourceStorage = _mocks.DynamicMock<IParsedSourceStorageService>();
      _source = _mocks.DynamicMock<ISourceGenerator>();
      _typeResolver = _mocks.DynamicMock<ITypeResolver>();
      _treeService = _mocks.DynamicMock<ITreeCreationService>();
      _viewSourceMapper = _mocks.DynamicMock<IViewSourceMapper>();
      _generator = _mocks.DynamicMock<IGenerator>();

      _task = new GenerateMonoRailSiteTreeTask(_logger, _parserService, _naming, _source, _sourceStorage, _typeResolver, _treeService, _viewSourceMapper, _generator);

      _item = _mocks.DynamicMock<ITaskItem>();
      _parsedSource = _mocks.DynamicMock<IParser>();
    }
 public GenerateMonoRailSiteTreeTask()
 {
     _logger = new MsBuildLogger(this.Log);
     _naming = new DefaultNamingService();
     _treeService = new DefaultTreeCreationService();
     _source = new DefaultSourceGenerator();
     _viewSourceMapper = new ViewSourceMapper(_logger, _treeService, _naming);
     _sourceStorage = new DefaultSourceStorageService();
     _typeResolver = new TypeResolver();
     _service = new SiteTreeGeneratorService(_logger, _typeResolver, _sourceStorage, new NRefactoryParserFactory());
     this.ServiceTypeName = typeof(ICodeGeneratorServices).FullName;
 }