示例#1
0
        public void SetUp()
        {
            var config = new ConfigurationBuilder()
                         .AddJsonFile("appsettings.json")
                         .Build();

            string connectionString = string.Empty;

            connectionString = config["connectionStrings:livehAPIConnection"];

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

            _context = new LiveHAPIContext(options);

            _clientPretestStageRepository = new ClientPretestStageRepository(_context);
            _clientEncounterRepository    = new ClientEncounterRepository(_context);
            _subscriberSystemRepository   = new SubscriberSystemRepository(_context);
            _practiceRepository           = new PracticeRepository(_context);
            _clientStageRepository        = new ClientStageRepository(_context);
            _contactsEncounterRepository  = new ContactsEncounterRepository(_context);


            _clientMessageLoader =
                new FamilyClientMessageLoader(

                    _practiceRepository, _clientStageRepository, new ClientStageRelationshipRepository(_context),
                    new ClientFamilyScreeningStageExtractor(_contactsEncounterRepository, _subscriberSystemRepository),
                    new ClientFamilyTracingStageExtractor(_contactsEncounterRepository, _subscriberSystemRepository));

            _clientMessageWriter =
                new FamilyWriter(new RestClient(_baseUrl), _clientMessageLoader, _clientStageRepository);
        }
示例#2
0
        public void SetUp()
        {
            var config = new ConfigurationBuilder()
                         .AddJsonFile("appsettings.json")
                         .Build();
            var connectionString = config["connectionStrings:livehAPIConnection"];
            var options          = new DbContextOptionsBuilder <LiveHAPIContext>()
                                   .UseSqlServer(connectionString)
                                   .Options;

            _context = new LiveHAPIContext(options);

            _clientEncounterRepository    = new ClientEncounterRepository(_context);
            _clientStageRepository        = new ClientStageRepository(_context);
            _clientPretestStageRepository = new ClientPretestStageRepository(_context);
            _subscriberSystemRepository   = new SubscriberSystemRepository(_context);

            _clientPretestStageExtractor =
                new ClientPretestStageExtractor(_clientStageRepository, _clientPretestStageRepository,
                                                _subscriberSystemRepository, _clientEncounterRepository, new ClientRepository(_context));


            var x = new ClientStageExtractor(new PersonRepository(_context), _clientStageRepository,
                                             _subscriberSystemRepository,
                                             new ClientRepository(_context), new PracticeRepository(_context)
                                             ).Extract().Result;

            _clientStageExtractor = new ClientStageExtractor(new PersonRepository(_context), _clientStageRepository,
                                                             _subscriberSystemRepository, new ClientRepository(_context), new PracticeRepository(_context));
        }
示例#3
0
        public void SetUp()
        {
            var config = new ConfigurationBuilder()
                         .AddJsonFile("appsettings.json")
                         .Build();
            //var connectionString = config["connectionStrings:hAPIConnection"].Replace("#dir#", TestContext.CurrentContext.TestDirectory.HasToEndWith(@"\"));
            var connectionString = config["connectionStrings:livehAPIConnection"];
            var options          = new DbContextOptionsBuilder <LiveHAPIContext>()
                                   .UseSqlServer(connectionString)
                                   .Options;

            _context = new LiveHAPIContext(options);

            _personRepository           = new PersonRepository(_context);
            _clientStageRepository      = new ClientStageRepository(_context);
            _subscriberSystemRepository = new SubscriberSystemRepository(_context);

            _clientStageExtractor =
                new ClientStageExtractor(_personRepository, _clientStageRepository, _subscriberSystemRepository, new ClientRepository(_context), new PracticeRepository(_context));

            subscriber = Builder <SubscriberSystem> .CreateNew()
                         .With(x => x.Id           = new Guid("16E23877-9D69-11E7-ABC4-CEC278B6B50A"))
                         .With(x => x.Translations = TestData.TestTranslations())
                         .Build();

            person = Builder <Person> .CreateNew().With(x => x.Gender = "F").Build();

            var client = Builder <Client> .CreateNew()
                         .With(x => x.KeyPop        = "O")
                         .With(x => x.MaritalStatus = "S")
                         .Build();

            person.Clients.Add(client);
        }
        public void SetUp()
        {
            var config = new ConfigurationBuilder()
                         .AddJsonFile("appsettings.json")
                         .Build();
            var connectionString = config["connectionStrings:livehAPIConnection"];
            //var connectionString = config["connectionStrings:livehAPIConnection"].Replace("#dir#", TestContext.CurrentContext.TestDirectory.HasToEndWith(@"\"));
            var options = new DbContextOptionsBuilder <LiveHAPIContext>()
                          .UseSqlServer(connectionString)
                          .Options;

            _context = new LiveHAPIContext(options);

            _clientPretestStageRepository = new ClientPretestStageRepository(_context);
            _clientEncounterRepository    = new ClientEncounterRepository(_context);
            _subscriberSystemRepository   = new SubscriberSystemRepository(_context);
            _practiceRepository           = new PracticeRepository(_context);
            _clientStageRepository        = new ClientStageRepository(_context);
            _contactsEncounterRepository  = new ContactsEncounterRepository(_context);
            _clientMessageLoader          =
                new FamilyClientMessageLoader(

                    _practiceRepository, _clientStageRepository, new ClientStageRelationshipRepository(_context),
                    new ClientFamilyScreeningStageExtractor(_contactsEncounterRepository, _subscriberSystemRepository),
                    new ClientFamilyTracingStageExtractor(_contactsEncounterRepository, _subscriberSystemRepository));

            _clientStageExtractor             = new ClientStageExtractor(new PersonRepository(_context), _clientStageRepository, _subscriberSystemRepository, new ClientRepository(_context), new PracticeRepository(_context));
            _clientPretestStageExtractor      = new ClientPretestStageExtractor(_clientStageRepository, _clientPretestStageRepository, _subscriberSystemRepository, _clientEncounterRepository, new ClientRepository(_context));
            _clientStageRelationshipExtractor = new ClientStageRelationshipExtractor(new ClientRelationshipRepository(_context), new ClientStageRelationshipRepository(_context), _subscriberSystemRepository);
        }
示例#5
0
        public void SetUp()
        {
            var config = new ConfigurationBuilder()
                         .AddJsonFile("appsettings.json")
                         .Build();

            //var connectionString = config["connectionStrings:hAPIConnection"].Replace("#dir#", TestContext.CurrentContext.TestDirectory.HasToEndWith(@"\"));

            var connectionString = config["connectionStrings:livehAPIConnection"];


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

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

            _repository = new UserRepository(_context);

            _clientStageRepository             = new ClientStageRepository(_context);
            _clientStageRelationshipRepository = new ClientStageRelationshipRepository(_context);
            _clientRepository             = new ClientRepository(_context);
            _clientPretestStageRepository = new ClientPretestStageRepository(_context);
            var clientStageExtractor =
                new ClientStageExtractor(new PersonRepository(_context), new ClientStageRepository(_context), new SubscriberSystemRepository(_context), new ClientRepository(_context), new PracticeRepository(_context));
            var clientStageRelationshipExtractor =
                new ClientStageRelationshipExtractor(new ClientRelationshipRepository(_context), new ClientStageRelationshipRepository(_context), new SubscriberSystemRepository(_context));
            var clientPretestStageExtractor =
                new ClientPretestStageExtractor(new ClientStageRepository(_context), new ClientPretestStageRepository(_context), new SubscriberSystemRepository(_context), new ClientEncounterRepository(_context), new ClientRepository(_context));

            _service = new ExtractClientsService(clientStageExtractor, clientStageRelationshipExtractor, clientPretestStageExtractor);
        }
示例#6
0
 protected ClientWriter(IRestClient restClient, IMessageLoader <T> loader,
                        IClientStageRepository clientStageRepository)
 {
     _restClient            = restClient;
     _loader                = loader;
     _clientStageRepository = clientStageRepository;
 }
示例#7
0
 public ProcessService(IMapper mapper,
                       IRepository <Consultant> consultantRepository,
                       IRepository <Candidate> candidateRepository,
                       IRepository <CandidateProfile> candidateProfileRepository,
                       IRepository <Community> communityRepository,
                       IRepository <Office> officeRepository,
                       IProcessRepository processRepository,
                       IProcessStageRepository processStageRepository,
                       IHrStageRepository hrStageRepository,
                       ITechnicalStageRepository technicalStageRepository,
                       IClientStageRepository clientStageRepository,
                       IOfferStageRepository offerStageRepository,
                       IUnitOfWork unitOfWork)
 {
     _consultantRepository       = consultantRepository;
     _candidateRepository        = candidateRepository;
     _candidateProfileRepository = candidateProfileRepository;
     _communityRepository        = communityRepository;
     _officeRepository           = officeRepository;
     _mapper                   = mapper;
     _processRepository        = processRepository;
     _processStageRepository   = processStageRepository;
     _hrStageRepository        = hrStageRepository;
     _technicalStageRepository = technicalStageRepository;
     _clientStageRepository    = clientStageRepository;
     _offerStageRepository     = offerStageRepository;
     _unitOfWork               = unitOfWork;
 }
示例#8
0
 public ClientPretestStageExtractor(IClientStageRepository clientStageRepository, IClientPretestStageRepository clientPretestStageRepository,
                                    ISubscriberSystemRepository subscriberSystemRepository, IClientEncounterRepository clientEncounterRepository, IClientRepository clientRepository)
 {
     _clientStageRepository        = clientStageRepository;
     _clientPretestStageRepository = clientPretestStageRepository;
     _subscriberSystemRepository   = subscriberSystemRepository;
     _clientEncounterRepository    = clientEncounterRepository;
     _clientRepository             = clientRepository;
 }
 public ClientStageExtractor(IPersonRepository personRepository, IClientStageRepository clientStageRepository,
                             ISubscriberSystemRepository subscriberSystemRepository, IClientRepository clientRepository, IPracticeRepository practiceRepository)
 {
     _personRepository           = personRepository;
     _clientStageRepository      = clientStageRepository;
     _subscriberSystemRepository = subscriberSystemRepository;
     _clientRepository           = clientRepository;
     _practiceRepository         = practiceRepository;
 }
 public FamilyClientMessageLoader(IPracticeRepository practiceRepository,
                                  IClientStageRepository clientStageRepository,
                                  IClientStageRelationshipRepository clientStageRelationshipRepository,
                                  IClientFamilyScreeningStageExtractor clientFamilyScreeningStageExtractor,
                                  IClientFamilyTracingStageExtractor clientFamilyTracingStageExtractor)
 {
     _practiceRepository                  = practiceRepository;
     _clientStageRepository               = clientStageRepository;
     _clientStageRelationshipRepository   = clientStageRelationshipRepository;
     _clientFamilyScreeningStageExtractor = clientFamilyScreeningStageExtractor;
     _clientFamilyTracingStageExtractor   = clientFamilyTracingStageExtractor;
 }
 public PartnerClientMessageLoader(IPracticeRepository practiceRepository,
                                   IClientStageRepository clientStageRepository,
                                   IClientStageRelationshipRepository clientStageRelationshipRepository,
                                   IClientPartnerScreeningStageExtractor clientPartnerScreeningStageExtractor,
                                   IClientPartnerTracingStageExtractor clientPartnerTracingStageExtractor)
 {
     _practiceRepository                   = practiceRepository;
     _clientStageRepository                = clientStageRepository;
     _clientStageRelationshipRepository    = clientStageRelationshipRepository;
     _clientPartnerScreeningStageExtractor = clientPartnerScreeningStageExtractor;
     _clientPartnerTracingStageExtractor   = clientPartnerTracingStageExtractor;
 }
        public void SetUp()
        {
            var config = new ConfigurationBuilder()
                         .AddJsonFile("appsettings.json")
                         .Build();

            string connectionString = string.Empty;

            if (goLive)
            {
                connectionString = config["connectionStrings:livehAPIConnection"];
            }
            else
            {
                connectionString = config["connectionStrings:hAPIConnection"].Replace("#dir#",
                                                                                      TestContext.CurrentContext.TestDirectory.HasToEndWith(@"\"));
            }


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

            _context = new LiveHAPIContext(options);


            _clientPretestStageRepository = new ClientPretestStageRepository(_context);
            _clientEncounterRepository    = new ClientEncounterRepository(_context);
            _subscriberSystemRepository   = new SubscriberSystemRepository(_context);
            _practiceRepository           = new PracticeRepository(_context);
            _clientStageRepository        = new ClientStageRepository(_context);

            _clientStageExtractor        = new ClientStageExtractor(new PersonRepository(_context), _clientStageRepository, _subscriberSystemRepository, new ClientRepository(_context), new PracticeRepository(_context));
            _clientPretestStageExtractor = new ClientPretestStageExtractor(_clientStageRepository, _clientPretestStageRepository, _subscriberSystemRepository, _clientEncounterRepository, new ClientRepository(_context));


            _clientMessageLoader =
                new IndexClientMessageLoader(_practiceRepository, _clientStageRepository, _clientPretestStageRepository,
                                             new ClientTestingStageExtractor(_clientEncounterRepository, _subscriberSystemRepository),
                                             new ClientFinalTestStageExtractor(_clientEncounterRepository, _subscriberSystemRepository),
                                             new ClientReferralStageExtractor(_clientEncounterRepository, _subscriberSystemRepository),
                                             new ClientTracingStageExtractor(_clientEncounterRepository, _subscriberSystemRepository),
                                             new ClientLinkageStageExtractor(_clientEncounterRepository, _subscriberSystemRepository)

                                             );

            _clientMessageWriter =
                new IndexClientMessageWriter(new RestClient(_baseUrl), _clientMessageLoader, _clientStageRepository);
        }
示例#13
0
        public void SetUp()
        {
            var config = new ConfigurationBuilder()
                         .AddJsonFile("appsettings.json")
                         .Build();
            var connectionString = config["connectionStrings:livehAPIConnection"];

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

            _context = new LiveHAPIContext(options);
            //TestData.Init();
            //TestDataCreator.Init(_context);

            _clientStageRepository = new ClientStageRepository(_context);
        }
 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;
 }
示例#15
0
 public DemographicsWriter(IRestClient restClient, IIndexClientMessageLoader loader,
                           IClientStageRepository clientStageRepository)
     : base(restClient, loader, clientStageRepository)
 {
 }
示例#16
0
 public PartnerWriter(IRestClient restClient, IPartnerClientMessageLoader loader,
     IClientStageRepository clientStageRepository)
     : base(restClient, loader, clientStageRepository)
 {
 }
示例#17
0
 public FamilyClientMessageWriter(IRestClient restClient, IFamilyClientMessageLoader loader,
                                  IClientStageRepository clientStageRepository) : base(restClient, loader, clientStageRepository)
 {
 }
示例#18
0
 public SyncManagerService(IClientStageRepository clientStageRepository)
 {
     _clientStageRepository = clientStageRepository;
 }