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>();
		}
Exemple #2
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>();
        }
Exemple #3
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()
		{
			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];
		}
Exemple #5
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];
 }
		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];
		}