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);
 }
Exemplo n.º 2
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);
 }
 public AdminYeastController()
 {
     _yeastRepository = YeastRepository.GetYeastRepository();
 }
 public AdminYeastController(IYeastRepository yeastRepository)
 {
     _yeastRepository = yeastRepository;
 }
Exemplo n.º 5
0
 public YeastService(IYeastRepository  yeastRepository,IYeastElasticsearch yeastElasticsearch)
 {
     _yeastRepository = yeastRepository;
     _yeastElasticsearch = yeastElasticsearch;
 }
 public void TestFixtureSetUp()
 {
     _yeastRepository = new YeastDapperRepository();
 }
Exemplo n.º 7
0
 public YeastController(IMapper mapper, IYeastRepository yeastRepository)
 {
     _mapper          = mapper;
     _yeastRepository = yeastRepository;
 }
Exemplo n.º 8
0
 public YeastService(IYeastRepository yeastRepository, IYeastElasticsearch yeastElasticsearch, ILogger <YeastService> logger)
 {
     _logger             = logger;
     _yeastRepository    = yeastRepository;
     _yeastElasticsearch = yeastElasticsearch;
 }
Exemplo n.º 9
0
 public YeastService(IYeastRepository yeastRepository, IYeastElasticsearch yeastElasticsearch)
 {
     _yeastRepository    = yeastRepository;
     _yeastElasticsearch = yeastElasticsearch;
 }
Exemplo n.º 10
0
 public YeastController(IYeastRepository yeastRepository, IUnitOfWork unitOfWork)
 {
     _yeastRepository = yeastRepository;
     _unitOfWork      = unitOfWork;
 }
Exemplo n.º 11
0
 public void TestFixtureSetUp()
 {
     _yeastRepository = new YeastDapperRepository();
 }