예제 #1
0
 public OrganizationsController(
     IOrganizationRepository organizationRepository,
     IOrganizationUserRepository organizationUserRepository,
     IPolicyRepository policyRepository,
     IOrganizationService organizationService,
     IUserService userService,
     IPaymentService paymentService,
     ICurrentContext currentContext,
     ISsoConfigRepository ssoConfigRepository,
     ISsoConfigService ssoConfigService,
     IGetOrganizationApiKeyCommand getOrganizationApiKeyCommand,
     IRotateOrganizationApiKeyCommand rotateOrganizationApiKeyCommand,
     IOrganizationApiKeyRepository organizationApiKeyRepository,
     GlobalSettings globalSettings)
 {
     _organizationRepository     = organizationRepository;
     _organizationUserRepository = organizationUserRepository;
     _policyRepository           = policyRepository;
     _organizationService        = organizationService;
     _userService                     = userService;
     _paymentService                  = paymentService;
     _currentContext                  = currentContext;
     _ssoConfigRepository             = ssoConfigRepository;
     _ssoConfigService                = ssoConfigService;
     _getOrganizationApiKeyCommand    = getOrganizationApiKeyCommand;
     _rotateOrganizationApiKeyCommand = rotateOrganizationApiKeyCommand;
     _organizationApiKeyRepository    = organizationApiKeyRepository;
     _globalSettings                  = globalSettings;
 }
        public OrganizationsControllerTests()
        {
            _currentContext                  = Substitute.For <ICurrentContext>();
            _globalSettings                  = Substitute.For <GlobalSettings>();
            _organizationRepository          = Substitute.For <IOrganizationRepository>();
            _organizationService             = Substitute.For <IOrganizationService>();
            _organizationUserRepository      = Substitute.For <IOrganizationUserRepository>();
            _paymentService                  = Substitute.For <IPaymentService>();
            _policyRepository                = Substitute.For <IPolicyRepository>();
            _ssoConfigRepository             = Substitute.For <ISsoConfigRepository>();
            _ssoConfigService                = Substitute.For <ISsoConfigService>();
            _getOrganizationApiKeyCommand    = Substitute.For <IGetOrganizationApiKeyCommand>();
            _rotateOrganizationApiKeyCommand = Substitute.For <IRotateOrganizationApiKeyCommand>();
            _organizationApiKeyRepository    = Substitute.For <IOrganizationApiKeyRepository>();
            _userService = Substitute.For <IUserService>();

            _sut = new OrganizationsController(_organizationRepository, _organizationUserRepository,
                                               _policyRepository, _organizationService, _userService, _paymentService, _currentContext,
                                               _ssoConfigRepository, _ssoConfigService, _getOrganizationApiKeyCommand, _rotateOrganizationApiKeyCommand,
                                               _organizationApiKeyRepository, _globalSettings);
        }