Exemple #1
0
        public void ShouldSendCorrectstats()
        {
            var expectedstats = new NewProviderStats
            {
                TotalCount             = 1,
                TotalEmployerProviders = 0, TotalMainProviders = 1, TotalSupportProviders = 0
            };

            Assert.True(expectedstats.TotalCount == _newProviderStats.TotalCount &&
                        expectedstats.TotalEmployerProviders == _newProviderStats.TotalEmployerProviders &&
                        expectedstats.TotalMainProviders == _newProviderStats.TotalMainProviders &&
                        expectedstats.TotalSupportProviders == _newProviderStats.TotalSupportProviders);
        }
Exemple #2
0
        public void TestSetup()
        {
            _settings              = new Mock <IIndexSettings <IMaintainProviderIndex> >();
            _indexMaintainer       = new Mock <IMaintainProviderIndex>();
            _providerDataService   = new Mock <IGetRoatpProviders>();
            _providerEventConsumer = new Mock <IConsumeProviderEvents>();
            _log = new Mock <ILog>();

            _sut = new ProviderIndexer(_settings.Object, _indexMaintainer.Object, _providerDataService.Object, _providerEventConsumer.Object, _log.Object);

            // Arrange
            _indexMaintainer.Setup(m => m.LoadRoatpProvidersFromIndex(It.IsAny <string>())).Returns(LoadNewRoatpProvidersFromIndex);
            _indexMaintainer.Setup(m => m.LoadRoatpProvidersFromAlias()).Returns(LoadoldRoatpProvidersFromIndex);

            // Act
            _newProviderStats = _sut.SendEvents(It.IsAny <string>());
        }