Example #1
0
 public IngredientService(IHopService hopService, IFermentableService fermentableService,
                          IOtherService otherService, IYeastService yeastService, IIngredientElasticsearch ingredientElasticsearch)
 {
     _hopService              = hopService;
     _fermentableService      = fermentableService;
     _otherService            = otherService;
     _yeastService            = yeastService;
     _ingredientElasticsearch = ingredientElasticsearch;
 }
 public void Init()
 {
     TestUtil.FlushRedisStore();
     TestUtil.DeleteDataInDatabase();
     TestUtil.InsertDataDatabase();
     AutoMapperConfiguration.Configure();
     _context = new MicrobrewitContext();
     _repository = new YeastRepository();
     _yeastElasticsearch = new YeastElasticsearch();
     _yeastService = new YeastService(_repository,_yeastElasticsearch);
     _controller = new YeastController(_yeastService);
     _node = new Uri("http://localhost:9200");
     _settings = new ConnectionSettings(_node, defaultIndex: Setting.ElasticSearchIndex);
     _client = new ElasticClient(_settings);
 }
Example #3
0
 public void Init()
 {
     TestUtil.FlushRedisStore();
     TestUtil.DeleteDataInDatabase();
     TestUtil.InsertDataDatabase();
     AutoMapperConfiguration.Configure();
     _context            = new MicrobrewitContext();
     _repository         = new YeastRepository();
     _yeastElasticsearch = new YeastElasticsearch();
     _yeastService       = new YeastService(_repository, _yeastElasticsearch);
     _controller         = new YeastController(_yeastService);
     _node     = new Uri("http://localhost:9200");
     _settings = new ConnectionSettings(_node, defaultIndex: Setting.ElasticSearchIndex);
     _client   = new ElasticClient(_settings);
 }
Example #4
0
 public YeastsController(IYeastService yeastService, ILogger <YeastsController> logger)
 {
     _yeastService = yeastService;
     _logger       = logger;
 }
 public YeastController(IYeastService yeastService)
 {
     _yeastService = yeastService;
 }
Example #6
0
 public YeastController(IYeastService service) : base(service)
 {
 }
 public YeastController(IYeastService yeastService)
 {
     _yeastService = yeastService;
 }