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(); }
public void AddMvcController_SelectedControllerFolderIsInVisualBasicProject_VisualBasicProjectIsPassedToMvcControllerGenerator() { CreateViewModelWithCSharpProject(); fakeSelectedMvcControllerFolder.SetVisualBasicAsTemplateLanguage(); viewModel.AddMvcController(); IMvcProject project = fakeControllerGenerator.Project; FakeMvcProject expectedProject = fakeSelectedMvcControllerFolder.FakeMvcProject; Assert.AreEqual(expectedProject, project); }
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 CreateClass(string name, FakeMvcProject fakeProject) { fakeClass = new FakeClass(name); mvcClass = new MvcClass(fakeClass, fakeProject); }
void CreateVisualBasicProject() { fakeProject = new FakeMvcProject(); fakeProject.SetVisualBasicAsTemplateLanguage(); }
void CreateCSharpProject() { fakeProject = new FakeMvcProject(); fakeProject.SetCSharpAsTemplateLanguage(); }
void CreateClass(string name, FakeMvcProject fakeProject) { fakeTypeDefinition = CreateFakeTypeDefinition(name); mvcClass = new MvcClass(fakeTypeDefinition, fakeProject); }
void CreateLocator() { fakeProject = new FakeMvcProject(); fakeParserService = new FakeMvcParserService(); locator = new MvcModelClassLocator(fakeParserService); }