public OutpatientController(ICoreService core, IOutpatientService outpatient, IPatientService patient, IConceptService concept) { ICoreService = core; IPatientService = patient; IConceptService = concept; IOutpatientService = outpatient; }
public ConceptController( IAlfrescoHttpClient alfrescoHttpClient, IAuditLogService auditLogService, INodesService nodesService, IDocumentService documentService, IConceptService conceptService, IIdentityUser identityUser, ISpisUmConfiguration spisUmConfiguration, IComponentService componentService, IValidationService validationService, ITranslateService translateService, ITransactionHistoryService transactionHistoryService, IAlfrescoModelComparer alfrescoModelComparer ) { _alfrescoHttpClient = alfrescoHttpClient; _auditLogService = auditLogService; _nodesService = nodesService; _documentService = documentService; _conceptService = conceptService; _identityUser = identityUser; _spisUmConfiguration = spisUmConfiguration; _componentService = componentService; _validationService = validationService; _translateService = translateService; _transactionHistoryService = transactionHistoryService; _alfrescoModelComparer = alfrescoModelComparer; }
public ConceptController(IConceptService conceptService, IPollService pollService, IMapper mapper, IUserService userService) { _conceptService = conceptService ?? throw new ArgumentNullException(nameof(conceptService)); _pollService = pollService ?? throw new ArgumentNullException(nameof(pollService)); _mapper = mapper ?? throw new ArgumentNullException(nameof(mapper)); _userService = userService ?? throw new ArgumentNullException(nameof(userService)); }
/// <summary> /// Initializes a new instance of the <see cref="MaterialController" /> class. /// </summary> /// <param name="conceptService">The concept service.</param> /// <param name="entityService">The entity service.</param> /// <param name="materialConceptService">The material concept service.</param> /// <param name="userService">The user service.</param> public MaterialController(IConceptService conceptService, IEntityService entityService, IMaterialConceptService materialConceptService, IUserService userService) { this.conceptService = conceptService; this.entityService = entityService; this.materialConceptService = materialConceptService; this.userService = userService; }
/// <summary> /// Initializes a new instance of the <see cref="PlaceController"/> class. /// </summary> public PlaceController(IConceptService conceptService, IEntityService entityService, IEntityRelationshipService entityRelationshipService, IPlaceConceptService placeConceptService, IUserService userService) { this.conceptService = conceptService; this.entityService = entityService; this.entityRelationshipService = entityRelationshipService; this.placeConceptService = placeConceptService; this.userService = userService; }
public RegistrationController(IPatientService ipatient, ICoreService icore, IFinanceService ifinance, IConceptService iconcept, IDoctorService idoctor) { IPatientService = ipatient; ICoreService = icore; IFinanceService = ifinance; IConceptService = iconcept; IDoctorService = idoctor; }
public ConceptControllerTest() { _tokenHelper = A.Fake <ITokenHelper>(); A.CallTo(() => _tokenHelper.ReturnScope(A <ClaimsPrincipal> ._)).Returns(_allowedScope); A.CallTo(() => _tokenHelper.GetUserInfo()).Returns(new UserInfo()); _service = A.Fake <IConceptService>(); _controller = new ConceptController(_service, _tokenHelper); _createConcept = new CreateConceptDto { Title = "Title", Content = "Content", Created = DateTime.Now, Updated = DateTime.Now, }; _updateConcept = new UpdateConceptDto { Title = "Title", Content = "Content", Created = DateTime.Now, Updated = DateTime.Now, }; _searchQuery = new ConceptSearchQuery { Title = "title", MetaIds = new List <int> { 1, 2 } }; _errorResponse = new Response { Errors = new ModelStateDictionary() }; _errorResponse.Errors.TryAddModelError("err", "err"); _listResponse = new Response { Data = new List <ConceptDto>() }; _singleResponse = new Response { Data = new ConceptDto() }; _userInfo = new UserInfo { Email = _allowedUserEmail, FullName = "Name" }; _listQuery = BaseListQuery.DefaultValues(language); }
public ConceptControllerTest() { _service = A.Fake <IConceptService>(); _controller = new ConceptController(_service); _concepts = new List <Concept> { new Concept { Title = "TestTitle" }, new Concept { Title = "Another test" }, }; }
public ConceptServiceTest() { _conceptRepository = A.Fake <IConceptRepository>(); _service = new ConceptService(_conceptRepository); _noSearchFields = new ConceptSearchFields(); _conceptsInDatabase = new List <Concept> { new Concept { Title = "TestTitle" }, new Concept { Title = "Another test" }, }; }
public ConceptServiceTest() { ConceptMediaRepository = A.Fake <IConceptMediaRepository>(); ConceptRepository = A.Fake <IConceptRepository>(); StatusRepository = A.Fake <IStatusRepository>(); LanguageRepository = A.Fake <ILanguageRepository>(); MetadataRepository = A.Fake <IMetadataRepository>(); UrlHelper = A.Fake <IUrlHelper>(); Mapper = AutoMapper.Mapper.Instance; Service = new ConceptService(ConceptRepository, StatusRepository, ConceptMediaRepository, MetadataRepository, LanguageRepository, Mapper, UrlHelper); Mock = new Mock.Mock(); _status = new Status(); BaseListQuery = BaseListQuery.DefaultValues("nb"); _language = new Language(); _listOfMetaWithLanguage = new List <MetaData> { new MetaData { Language = _language, Category = new MetaCategory { TypeGroup = new TypeGroup { Name = "language" } } } }; _userInfo = new UserInfo { FullName = "Fullname", Email = "Email" }; A.CallTo(() => StatusRepository.GetById(A <int> ._)).Returns(null); A.CallTo(() => MetadataRepository.GetByRangeOfIds(A <List <int> > ._)).Returns(_listOfMetaWithLanguage); A.CallTo(() => LanguageRepository.GetByAbbreviation(A <string> ._)).Returns(_language); }
public ConceptController(IConceptService service, ITokenHelper tokenHelper) { _service = service; _tokenHelper = tokenHelper; }
public void Setup() { _testModules = _factory.GenerateTestModules(); _uow = new UnitOfWork(new SyncContext()); _conceptService = new ConceptService(_uow); }
public DatasetMetadataController(ISecurityService securityService, IDatasetService datasetService, IConceptService conceptService) : base(securityService) { _datasetService = datasetService; _conceptService = conceptService; }
/// <summary> /// Initializes a new instance of the <see cref="EntityService" /> class. /// </summary> /// <param name="client">The client.</param> /// <param name="conceptService">The concept service.</param> /// <param name="coreAuditService">The core audit service.</param> /// <param name="entityAuditService">The entity audit service.</param> public EntityService(ImsiServiceClient client, IConceptService conceptService, ICoreAuditService coreAuditService, IEntityAuditService entityAuditService) : base(client) { this.conceptService = conceptService; this.coreAuditService = coreAuditService; this.entityAuditService = entityAuditService; }
/// <summary> /// Initializes a new instance of the <see cref="EntityRelationshipService" /> class. /// </summary> /// <param name="client">The client.</param> /// <param name="conceptService">The concept service.</param> public EntityRelationshipService(ImsiServiceClient client, IConceptService conceptService, IEntityService entityService) : base(client) { this.conceptService = conceptService; this.entityService = entityService; }
public ProgressionRequestValidator(ISubjectService subjectService, IConceptService conceptService) { RuleFor(x => x.SubjectId).NotEmpty().MustExistInDatabase(subjectService); RuleFor(x => x.ConceptId).NotEmpty().MustExistInDatabase(conceptService); }
/// <summary> /// Initializes a new instance of the <see cref="MaterialConceptService"/> class. /// </summary> /// <param name="client">The client.</param> /// <param name="cacheService">The cache service.</param> /// <param name="conceptService">The concept service.</param> public MaterialConceptService(ImsiServiceClient client, ICacheService cacheService, IConceptService conceptService) : base(client) { this.cacheService = cacheService; this.conceptService = conceptService; }
public async Task Return_All_Progressions(Mock <IProgressionService> service, ISubjectService subjects, IConceptService concepts, List <Progression> progressions, User user) { service.Setup(x => x.GetAll(user, It.IsAny <CancellationToken>())).ReturnsAsync(progressions); var controller = TestSetup.SetupController <ProgressionController>(service.Object, subjects, concepts).SetupSession(user); var result = await controller.GetProgressions(); result.Should().NotBeNull().And.BeEquivalentTo(progressions.Select(x => new ProgressionResponse(x))); }
public ProgressionController(IProgressionService progression, ISubjectService subjects, IConceptService concepts) { _progression = progression; _subjects = subjects; _concepts = concepts; }
public ConceptController(IConceptService conceptService) { _conceptService = conceptService; }
public ConceptController(IConceptService service) { _service = service; }
/// <summary> /// Initializes a new instance of the <see cref="PlaceConceptService"/> class. /// </summary> /// <param name="client">The client.</param> /// <param name="conceptService">The concept service.</param> public PlaceConceptService(ImsiServiceClient client, IConceptService conceptService) : base(client) { this.conceptService = conceptService; }
public async Task Return_Progression_Or_One_Of_204_404(Mock <IProgressionService> service, Mock <ISubjectService> subjects, IConceptService concepts, Progression progression, User user, Subject subject, Subject badSubject) { subjects.Setup(x => x.Get(subject.Id, It.IsAny <CancellationToken>())).ReturnsAsync(subject); subjects.Setup(x => x.Get(badSubject.Id, It.IsAny <CancellationToken>())).ReturnsAsync(badSubject); subjects.Setup(x => x.Get(Guid.Empty, It.IsAny <CancellationToken>())).ReturnsAsync((Subject)null); service.Setup(x => x.Get(user, subject, It.IsAny <CancellationToken>())).ReturnsAsync(progression); service.Setup(x => x.Get(user, badSubject, It.IsAny <CancellationToken>())).ReturnsAsync((Progression)null); var controller = TestSetup.SetupController <ProgressionController>(service.Object, subjects.Object, concepts).SetupSession(user); var result = await controller.GetProgression(subject.Id); var result204 = await controller.GetProgression(badSubject.Id); var result404 = await controller.GetProgression(Guid.Empty); result.Value.Should().NotBeNull().And.BeEquivalentTo(new ProgressionResponse(progression)); result204.Value.Should().BeNull(); result204.Result.Should().BeOfType(typeof(NoContentResult)); result404.Value.Should().BeNull(); result404.Result.Should().BeOfType(typeof(NotFoundResult)); }
public ConceptsController(IConceptService concepts, IAuthorizationService authorization) { _concepts = concepts; _authorization = authorization; }