public SetupMockedServices()
 {
     _exposureKeyMock = new ExposureKeyMock();
     _webContextMock  = new WebContextMock();
     _countryFactory  = new CountryMockFactory();
     _rndGenerator    = new MockRandomGenerator();
 }
 public void Init()
 {
     _epochConverter = new Mock <IEpochConverter>(MockBehavior.Strict);
     SetupEpochConverterMock();
     _keyValidator    = new KeyValidator(_epochConverter.Object);
     _countryFactory  = new CountryMockFactory();
     _rndGenerator    = new MockRandomGenerator();
     _exposureKeyMock = new ExposureKeyMock();
     _key             = _exposureKeyMock.CreateMockedExposureKey();
 }
Esempio n. 3
0
 public ExposureKeyMock()
 {
     _countryFactory = new CountryMockFactory();
     _rndGenerator   = new MockRandomGenerator();
     _epochConverter = new EpochConverter();
     _countries      = new List <string>()
     {
         "AT", "BE", "BG", "HR", "CY", "CZ", "DK", "EE", "FI", "FR",
         "GR", "HU", "IE", "IT", "LV", "LT", "LU", "MT", "NL", "PL",
         "PT", "RO", "SK", "SI", "ES", "SE"
     };
     _potentialDuplicate01 = MockValidKey();
     _potentialDuplicate02 = MockValidKey();
     MockListLength        = 5;
 }
Esempio n. 4
0
        public void Init()
        {
            _exposureKeyMock   = new ExposureKeyMock();
            _countryFactory    = new CountryMockFactory();
            _mockServices      = new SetupMockedServices();
            _keyValidator      = new Mock <IKeyValidator>(MockBehavior.Strict);
            _logger            = new Mock <ILogger <KeyFilter> >();
            _repository        = new Mock <ITemporaryExposureKeyRepository>(MockBehavior.Strict);
            _countryRepository = new Mock <ICountryRepository>(MockBehavior.Strict);
            _mockServices.SetupMapperAndCountryRepositoryMock(_countryRepository);
            _keyMapper = _mockServices.CreateAutoMapperWithDependencies(_countryRepository.Object);
            _mockServices.SetupKeyValidatorMock(_keyValidator);
            _mockServices.SetupTemopraryExposureKeyRepositoryMock(_repository);

            var mapper = new ExposureKeyMapper();

            _keyFilter = new KeyFilter(_keyMapper, _keyValidator.Object, mapper, _logger.Object, _repository.Object);
        }