コード例 #1
0
		void CreateGenerator(MvcTextTemplateRepository templateRepository)
		{
			fakeHostFactory = new FakeMvcTextTemplateHostFactory();
			fakeHost = fakeHostFactory.FakeMvcTextTemplateHost;
			fakeAppDomainFactory = new FakeMvcTextTemplateAppDomainFactory();
			generator = new MvcViewFileGenerator(fakeHostFactory, templateRepository, fakeAppDomainFactory);
			projectUsedByGenerator = new FakeMvcProject();
			generator.Project = projectUsedByGenerator;
			ProjectPassedToGeneratorIsCSharpProject();
		}
コード例 #2
0
		void CreateGenerator()
		{
			fakeHostFactory = new FakeMvcTextTemplateHostFactory();
			fakeHost = fakeHostFactory.FakeMvcTextTemplateHost;
			fakeAppDomainFactory = new FakeMvcTextTemplateAppDomainFactory();
			fakeErrorReporter = MockRepository.GenerateStub<IMvcFileGenerationErrorReporter>();
			generator = new MvcControllerFileGenerator(fakeHostFactory, fakeAppDomainFactory, fakeErrorReporter);
			projectUsedByGenerator = new FakeMvcProject();
			generator.Project = projectUsedByGenerator;
			ProjectPassedToGeneratorIsCSharpProject();
		}