public IndexClientMessageLoader(IPracticeRepository practiceRepository,
                                 IClientStageRepository clientStageRepository, IClientPretestStageRepository clientPretestStageRepository,
                                 IClientTestingStageExtractor clientTestingStageExtractor,
                                 IClientFinalTestStageExtractor clientFinalTestStageExtractor,
                                 IClientReferralStageExtractor clientReferralStageExtractor,
                                 IClientTracingStageExtractor clientTracingStageExtractor,
                                 IClientLinkageStageExtractor clientLinkageStageExtractor)
 {
     _practiceRepository            = practiceRepository;
     _clientStageRepository         = clientStageRepository;
     _clientPretestStageRepository  = clientPretestStageRepository;
     _clientTestingStageExtractor   = clientTestingStageExtractor;
     _clientFinalTestStageExtractor = clientFinalTestStageExtractor;
     _clientReferralStageExtractor  = clientReferralStageExtractor;
     _clientTracingStageExtractor   = clientTracingStageExtractor;
     _clientLinkageStageExtractor   = clientLinkageStageExtractor;
 }
        public void SetUp()
        {
            var config = new ConfigurationBuilder()
                         .AddJsonFile("appsettings.json")
                         .Build();
            var connectionString = config["connectionStrings:hAPIConnection"].Replace("#dir#", TestContext.CurrentContext.TestDirectory.HasToEndWith(@"\"));
            var options          = new DbContextOptionsBuilder <LiveHAPIContext>()
                                   .UseSqlServer(connectionString)
                                   .Options;

            _context = new LiveHAPIContext(options);
            _clientEncounterRepository  = new ClientEncounterRepository(_context);
            _subscriberSystemRepository = new SubscriberSystemRepository(_context);

            _stageExtractor =
                new ClientLinkageStageExtractor(_clientEncounterRepository, _subscriberSystemRepository);
        }