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();
        }
Ejemplo n.º 2
0
 public SyncLookupService(IClientLookupReader clientLookupReader, ISubscriberTranslationRepository subscriberTranslationRepository)
 {
     _subscriberTranslationRepository = subscriberTranslationRepository;
     _clientLookupReader = clientLookupReader;
 }
 public void Setup()
 {
     _reader = new ClientLookupReader(new RestClient(_baseUrl));
 }