public GenerateController() { this.referencesService = DependencyResolver.Current.GetService <ReferencesService>(); this.buildViewModelsSvc = DependencyResolver.Current.GetService <BuildViewModelsService>(); this.builderConfig = DependencyResolver.Current.GetService <IYuzuViewmodelsBuilderConfig>(); //must be resolved here so that all profiles are created before viewmodel generation this.mapper = DependencyResolver.Current.GetService <IMapper>(); }
public void Setup() { var config = MockRepository.GenerateStub <IYuzuConfiguration>(); config.TemplateLocations = new List <ITemplateLocation>(); config.TemplateLocations.Add(new TemplateLocation() { Name = "Pages", Schema = "some" }); config.TemplateLocations.Add(new TemplateLocation() { Name = "Partials", Schema = "some" }); svc = MockRepository.GeneratePartialMock <ReferencesService>(new object[] { config }); references = new List <string>(); excludedTypes = new List <string>(); }
public void Setup() { var configMock = new Moq.Mock <IYuzuConfiguration>().SetupAllProperties(); var config = configMock.Object; config.TemplateLocations = new List <ITemplateLocation>(); config.TemplateLocations.Add(new TemplateLocation() { Name = "Pages", Schema = "some" }); config.TemplateLocations.Add(new TemplateLocation() { Name = "Partials", Schema = "some" }); svc = new Moq.Mock <ReferencesService>(MockBehavior.Loose, config) { CallBase = true }.Object; references = new List <string>(); excludedTypes = new List <string>(); }