コード例 #1
0
        public DrugResistanceProfileServiceTest()
        {
            mockNotificationRepository       = new Mock <INotificationRepository>();
            mockNotificationService          = new Mock <INotificationService>();
            mockMdrService                   = new Mock <IEnhancedSurveillanceAlertsService>();
            mockDrugResistanceProfileService = new Mock <IDrugResistanceProfileRepository>();

            drpService = new DrugResistanceProfileService(
                mockNotificationService.Object,
                mockNotificationRepository.Object,
                mockDrugResistanceProfileService.Object,
                mockMdrService.Object);
        }
コード例 #2
0
        public DrugResistanceProfileServiceTest()
        {
            mockNotificationRepository = new Mock <INotificationRepository>();
            mockNotificationService    = new Mock <INotificationService>();
            mockNotificationService
            .Setup(x => x.UpdateDrugResistanceProfilesAsync(
                       It.IsAny <IEnumerable <(DrugResistanceProfile, DrugResistanceProfile)> >()))
            .Callback <IEnumerable <(DrugResistanceProfile, DrugResistanceProfile)> >(x =>
            {
                numberOfUpdatesOnLastRun = x.Count();
            });
            mockMdrService = new Mock <IEnhancedSurveillanceAlertsService>();
            mockDrugResistanceProfileRepository = new Mock <IDrugResistanceProfileRepository>();

            drpService = new DrugResistanceProfileService(
                mockNotificationService.Object,
                mockNotificationRepository.Object,
                mockDrugResistanceProfileRepository.Object,
                mockMdrService.Object);
        }