예제 #1
0
        public static ILookupService GetLookupService(ServiceProvider serviceProvider)
        {
            var db                    = serviceProvider.GetService <SepesDbContext>();
            var mapper                = serviceProvider.GetService <IMapper>();
            var userService           = UserFactory.GetUserServiceMockForAdmin(1);
            var studyModelServiceMock = StudyServiceMockFactory.StudyEfModelService(serviceProvider);

            return(new LookupService(db, mapper, userService.Object, studyModelServiceMock));
        }
        public static IStudyParticipantLookupService GetStudyParticipantLookupService(ServiceProvider serviceProvider)
        {
            var db          = serviceProvider.GetService <SepesDbContext>();
            var mapper      = serviceProvider.GetService <IMapper>();
            var logger      = serviceProvider.GetService <ILogger <StudyParticipantLookupService> >();
            var userService = UserFactory.GetUserServiceMockForAdmin(1);

            var studyModelService = StudyServiceMockFactory.StudyEfModelService(serviceProvider);

            var azureUserService = new Mock <IAzureUserService>();

            var provisioningQueueService = new Mock <IProvisioningQueueService>();

            var resourceReadServiceMock = new Mock <ICloudResourceReadService>();

            var cloudResourceOperationCreateService = new Mock <ICloudResourceOperationCreateService>();

            var cloudResourceOperationUpdateService = new Mock <ICloudResourceOperationUpdateService>();

            return(new StudyParticipantLookupService(db, logger, mapper, userService.Object, azureUserService.Object, studyModelService, provisioningQueueService.Object, resourceReadServiceMock.Object, cloudResourceOperationCreateService.Object, cloudResourceOperationUpdateService.Object));
        }