Beispiel #1
0
        public CertificateValidationMessageHandlerIntegrationTests(CertificateIntegrationTestFixture fixture)
        {
            _fixture = fixture;

            _context = new Mock<IValidationEntitiesContext>();
            _telemetryService = new Mock<ITelemetryService>();
            _certificateStore = new Mock<ICertificateStore>();
            _validationEnqueuer = new Mock<IPackageValidationEnqueuer>();
            _featureFlagService = new Mock<IFeatureFlagService>();

            _featureFlagService.SetReturnsDefault(true);

            var certificateValidationService = new CertificateValidationService(
                _context.Object,
                _telemetryService.Object,
                Mock.Of<ILogger<CertificateValidationService>>());

            _target = new CertificateValidationMessageHandler(
                _certificateStore.Object,
                certificateValidationService,
                new OnlineCertificateVerifier(),
                _validationEnqueuer.Object,
                _featureFlagService.Object,
                Mock.Of<ILogger<CertificateValidationMessageHandler>>());
        }
Beispiel #2
0
        public CertificateValidationMessageHandlerIntegrationTests(CertificateIntegrationTestFixture fixture)
        {
            _fixture = fixture;

            _context          = new Mock <IValidationEntitiesContext>();
            _telemetryService = new Mock <ITelemetryService>();
            _certificateStore = new Mock <ICertificateStore>();

            var certificateValidationService = new CertificateValidationService(
                _context.Object,
                _telemetryService.Object,
                Mock.Of <ILogger <CertificateValidationService> >());

            _target = new CertificateValidationMessageHandler(
                _certificateStore.Object,
                certificateValidationService,
                new OnlineCertificateVerifier(),
                Mock.Of <ILogger <CertificateValidationMessageHandler> >());
        }