예제 #1
0
 public DomainContoller(IDomainDao domainDao,
                        IUserDao userDao,
                        IGroupDao groupDao,
                        IGroupDomainDao groupDomainDao,
                        IValidator <GetEntitiesByRelatedIdRequest> idSearchablePagedRequestValidator,
                        IValidator <ChangeMembershipRequest> idEntityIdsRequestValidator,
                        IValidator <DomainForCreation> domainForCreationValidator,
                        IValidator <EntitySearchRequest> searchLimitExcludedIdsRequestValidator,
                        IValidator <PublicDomainForCreation> publicDomainForCreationValidator,
                        ILogger <DomainContoller> log,
                        IPublisher publisher,
                        IPublisherConfig config)
 {
     _domainDao      = domainDao;
     _userDao        = userDao;
     _groupDao       = groupDao;
     _groupDomainDao = groupDomainDao;
     _idSearchablePagedRequestValidator      = idSearchablePagedRequestValidator;
     _idEntityIdsRequestValidator            = idEntityIdsRequestValidator;
     _domainForCreationValidator             = domainForCreationValidator;
     _searchLimitExcludedIdsRequestValidator = searchLimitExcludedIdsRequestValidator;
     _publicDomainForCreationValidator       = publicDomainForCreationValidator;
     _log       = log;
     _publisher = publisher;
     _config    = config;
 }
예제 #2
0
        public void SetUp()
        {
            _domainDao      = A.Fake <IDomainDao>();
            _userDao        = A.Fake <IUserDao>();
            _groupDao       = A.Fake <IGroupDao>();
            _groupDomainDao = A.Fake <IGroupDomainDao>();
            _idSearchablePagedRequestValidator      = A.Fake <IValidator <GetEntitiesByRelatedIdRequest> >();
            _idEntityIdsRequestValidator            = A.Fake <IValidator <ChangeMembershipRequest> >();
            _domainForCreationValidator             = A.Fake <IValidator <DomainForCreation> >();
            _searchLimitExcludedIdsRequestValidator = A.Fake <IValidator <EntitySearchRequest> >();
            _publicDomainForCreationValidator       = A.Fake <IValidator <PublicDomainForCreation> >();
            _log = A.Fake <ILogger <DomainContoller> >();
            _organisationalDomainProvider = A.Fake <IOrganisationalDomainProvider>();
            _publisher       = A.Fake <IPublisher>();
            _publisherConfig = A.Fake <IPublisherConfig>();

            _domainContoller = new DomainContoller(_domainDao, _userDao, _groupDao, _groupDomainDao,
                                                   _idSearchablePagedRequestValidator, _idEntityIdsRequestValidator, _domainForCreationValidator,
                                                   _searchLimitExcludedIdsRequestValidator,
                                                   _publicDomainForCreationValidator, _log, _organisationalDomainProvider, _publisher, _publisherConfig)
            {
                ControllerContext = new ControllerContext
                {
                    HttpContext = new DefaultHttpContext
                    {
                        User = new ClaimsPrincipal(new ClaimsIdentity())
                    }
                }
            };
        }
 public UserController(IUserDao userDao,
                       IGroupDao groupDao,
                       IDomainDao domainDao,
                       IGroupUserDao groupUserDao,
                       IValidator <GetEntitiesByRelatedIdRequest> searchablePagedRequestValidator,
                       IValidator <ChangeMembershipRequest> idEntityIdsRequestValidator,
                       IValidator <UserForCreation> userForCreationValidator,
                       IValidator <EntitySearchRequest> searchLimitExcludedIdsRequestValidator,
                       ILogger <UserController> log)
 {
     _userDao      = userDao;
     _groupDao     = groupDao;
     _domainDao    = domainDao;
     _groupUserDao = groupUserDao;
     _searchablePagedRequestValidator        = searchablePagedRequestValidator;
     _idEntityIdsRequestValidator            = idEntityIdsRequestValidator;
     _userForCreationValidator               = userForCreationValidator;
     _searchLimitExcludedIdsRequestValidator = searchLimitExcludedIdsRequestValidator;
     _log = log;
 }
 public Seeder(IDomainDao domainDao, ISqsPublisher publisher, ISeederConfig config)
 {
     _domainDao = domainDao;
     _publisher = publisher;
     _config    = config;
 }