void CreateSelectedFolder(string folder)
		{
			selectedFolder = new TestableSelectedMvcViewFolder();
			fakeSelectedFolderNode = selectedFolder.FakeSelectedFolderNodeInProjectsView;
			fakeSelectedFolderNode.Folder = folder;
			projectForSelectedFolder = fakeSelectedFolderNode.FakeMvcProject;
			fakeFileService = selectedFolder.FakeFileService;
		}
		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();
		}
		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();
		}
		void CreateViewModelWithViewFolderPath(
			string path,
			FakeMvcTextTemplateRepository fakeTextTemplateRepository,
			MvcTextTemplateLanguage templateLanguage)
		{
			fakeSelectedMvcViewFolder = new FakeSelectedMvcFolder();
			fakeSelectedMvcViewFolder.Path = path;
			fakeSelectedMvcViewFolder.TemplateLanguage = templateLanguage;
			fakeProject = fakeSelectedMvcViewFolder.FakeMvcProject;
			fakeViewGenerator = new FakeMvcViewFileGenerator();
			viewModel = new AddMvcViewToProjectViewModel(
				fakeSelectedMvcViewFolder,
				fakeViewGenerator,
				fakeTextTemplateRepository);
		}
		void CreateLocator()
		{
			fakeProject = new FakeMvcProject();
			fakeParserService = new FakeMvcParserService();
			locator = new MvcModelClassLocator(fakeParserService);
		}
Esempio n. 6
0
		void CreateClass(string name, FakeMvcProject fakeProject)
		{
			fakeTypeDefinition = CreateFakeTypeDefinition(name);
			mvcClass = new MvcClass(fakeTypeDefinition, fakeProject);
		}
Esempio n. 7
0
		void CreateVisualBasicProject()
		{
			fakeProject = new FakeMvcProject();
			fakeProject.SetVisualBasicAsTemplateLanguage();
		}
Esempio n. 8
0
		void CreateCSharpProject()
		{
			fakeProject = new FakeMvcProject();
			fakeProject.SetCSharpAsTemplateLanguage();
		}