void CreateSelectedFolder(string folder)
 {
     selectedFolder                = new TestableSelectedMvcViewFolder();
     fakeSelectedFolderNode        = selectedFolder.FakeSelectedFolderNodeInProjectsView;
     fakeSelectedFolderNode.Folder = folder;
     projectForSelectedFolder      = fakeSelectedFolderNode.FakeMvcProject;
     fakeFileService               = selectedFolder.FakeFileService;
 }
Пример #2
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();
 }
        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();
 }
Пример #5
0
 void CreateClass(string name, FakeMvcProject fakeProject)
 {
     fakeClass = new FakeClass(name);
     mvcClass  = new MvcClass(fakeClass, fakeProject);
 }
Пример #6
0
 void CreateVisualBasicProject()
 {
     fakeProject = new FakeMvcProject();
     fakeProject.SetVisualBasicAsTemplateLanguage();
 }
Пример #7
0
 void CreateCSharpProject()
 {
     fakeProject = new FakeMvcProject();
     fakeProject.SetCSharpAsTemplateLanguage();
 }
Пример #8
0
 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);
 }