public void Init()
 {
     TestUtil.DeleteDataInDatabase();
     TestUtil.InsertDataDatabase();
     AutoMapperConfiguration.Configure();
     _context = new MicrobrewitContext();
     _beerStyleElasticsearch = new BeerStyleElasticsearch();
     _repository = new BeerStyleRepository();
     _beerStyleService = new BeerStyleService(_beerStyleElasticsearch,_repository);
     _controller = new BeerStyleController(_beerStyleService);
 }
Esempio n. 2
0
		/// <summary>
		/// ctor the Mighty
		/// </summary>
		public AdminController(IUnitOfWorkFactory<BrewgrContext> unitOfWorkFactory, IUserService userService, IAdminService adminService, 
			IMarketingService marketingService, IRecipeDataService brewDataService, IBeerStyleService beerStyleService,
			IAffiliateService affiliateService, IAuthenticationService authenticationService, ISendToShopService sendToShopService)
		{
			this.UnitOfWorkFactory = unitOfWorkFactory;
			this.UserService = userService;
			this.AdminService = adminService;
			this.MarketingService = marketingService;
			this.BrewDataService = brewDataService;
            this.BeerStyleService = beerStyleService;
			this.AffiliateService = affiliateService;
			this.AuthenticationService = authenticationService;
			this.SendToShopService = sendToShopService;
		}
		/// <summary>
		/// ctor the Mighty
		/// </summary>
		public DefaultBeerXmlRecipeImporter(IRecipeUnitConverter recipeUnitConverter, IRecipeDataService brewDataService, IBeerStyleService beerStyleService,
			IUserResolver userResolver)
		{
			this.RecipeUnitConverter = recipeUnitConverter;
			this.BrewDataService = brewDataService;
			this.BeerStyleService = beerStyleService;

			// Detect User Id
			var user = userResolver.Resolve();
			if(user != null)
			{
				this.UserId = user.UserId;
			}
		}
Esempio n. 4
0
		/// <summary>
		/// ctor the Mighty
		/// </summary>
		public RecipeController(IUnitOfWorkFactory<BrewgrContext> unitOfWorkFactory, IRecipeService recipeService, IBeerStyleService beerStyleService, 
			IStaticContentService staticContentService, IUserService userService, INotificationService notificationService, IPartnerIdResolver partnerIdResolver,
			IBeerXmlRecipeExporter beerXmlExporter, IBeerXmlRecipeImporter beerXmlImporter, IPartnerService partnerService, ISendToShopService sendToShopService)
		{
			this.UnitOfWorkFactory = unitOfWorkFactory;
			this.RecipeService = recipeService;
			this.BeerStyleService = beerStyleService;
			this.StaticContentService = staticContentService;
            this.UserService = userService;
			this.NotificationService = notificationService;
			this.PartnerIdResolver = partnerIdResolver;
			this.BeerXmlExporter = beerXmlExporter;
			this.BeerXmlImporter = beerXmlImporter;
			this.PartnerService = partnerService;
			this.SendToShopService = sendToShopService;
		}
		/// <summary>
		/// ctor the Mighty
		/// </summary>
		public BrewgrSeoSitemap(IRecipeService recipeService, IBeerStyleService beerStyleService, IUserService userService)
		{
			this.RecipeService = recipeService;
			this.BeerStyleService = beerStyleService;
			this.UserService = userService;
		}
 public BeerStyleController(IBeerStyleService beerStyleService)
 {
     _beerStyleService = beerStyleService;
 }
		/// <summary>
		/// ctor the Mighty
		/// </summary>
		public RecipeSearchController(IBeerStyleService beerStyleService, IRecipeSearchService recipeSearchService)
		{
			this.BeerStyleService = beerStyleService;
			this.RecipeSearchService = recipeSearchService;
		}
		/// <summary>
		/// ctor the Mighty
		/// </summary>
		public DefaultBeerXmlRecipeExporter(IWebSettings webSettings, IRecipeUnitConverter recipeUnitConverter, IBeerStyleService beerStyleService)
		{
			this.WebSettings = webSettings;
			this.RecipeUnitConverter = recipeUnitConverter;
			this.BeerStyleService = beerStyleService;
		}