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); _encounterRepository = new EncounterRepository(_context); //_encounterService =new EncounterService(new ClientRepository(_context),new PracticeRepository(_context),_encounterRepository,new ObsRepository(_context) ); }
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); _userRepository = new UserRepository(_context); _personRepository = new PersonRepository(_context); }
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:hAPIConnection"]; var options = new DbContextOptionsBuilder <LiveHAPIContext>() .UseSqlServer(connectionString) .Options; _context = new LiveHAPIContext(options); TestData.Init(); TestDataCreator.Init(_context); _personRepository = new PersonRepository(_context); var activationService = new ActivationService(new PracticeRepository(_context), new PracticeActivationRepository(_context), new MasterFacilityRepository(_context)); _staffService = new StaffService(new PersonNameRepository(_context), new PersonRepository(_context), new UserRepository(_context), new ProviderRepository(_context), activationService); }
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); _clientInfos = TestData.TestClientInfos(); _practiceRepository = new PracticeRepository(_context); _personRepository = new PersonRepository(_context); _clientRepository = new ClientRepository(_context); _clientService = new ClientService(_practiceRepository, new PersonRepository(_context), new ClientRepository(_context), new InvalidMessageRepository(_context)); }