public void SetUp()
        {
            var config = new ConfigurationBuilder()
                         .AddJsonFile("appsettings.json")
                         .Build();
            var connectionString = config["connectionStrings:hAPIConnection"];

            var options = new DbContextOptionsBuilder <LiveHAPIContext>()
                          .UseSqlServer(connectionString)
                          .Options;

            _context = new LiveHAPIContext(options);
            TestData.Init();
            TestDataCreator.Init(_context);
            _subscriberSystems = _context.SubscriberSystems.ToList();
            _subscriberSystem  = _subscriberSystems.First(x => x.IsDefault);
            _subscriberTranslationRepository = new SubscriberTranslationRepository(_context);
        }
        public void SetUp()
        {
            var config = new ConfigurationBuilder()
                         .AddJsonFile("appsettings.json")
                         .Build();
            var connectionString = config["connectionStrings:livehAPIConnection"];

            var options = new DbContextOptionsBuilder <LiveHAPIContext>()
                          .UseSqlServer(connectionString)
                          .Options;

            _reader  = new ClientLookupReader(new RestClient(_baseUrl));
            _context = new LiveHAPIContext(options);

            _repository = new SubscriberTranslationRepository(_context);
            _subscriberSystemRepository = new SubscriberSystemRepository(_context);
            _service = new SyncLookupService(_reader, _repository);
            _emr     = _subscriberSystemRepository.GetDefault();
        }
Beispiel #3
0
 public SyncLookupService(IClientLookupReader clientLookupReader, ISubscriberTranslationRepository subscriberTranslationRepository)
 {
     _subscriberTranslationRepository = subscriberTranslationRepository;
     _clientLookupReader = clientLookupReader;
 }