예제 #1
0
 public AccountsWindow(Customer customer,
                       IAccountRepository accountRepository,
                       IAccountValidator accountValidator,
                       IWindowDialogService windowDialogService)
 {
     InitializeComponent();
 }
예제 #2
0
        public AccountManager(
            ISecurityProvider securityProvider,
            IAccountRepository accountRepository,
            IAccountValidator accountValidator,
            ITimeSource timeSource,
            int accountSessionCollectionCapacity,
            ISessionRepository sessionRepository,
            IActionRightResolver actionRightResolver/*,
            Func<TBizAccountRegistrationData, TBizAccount> accountRegistrationDataToAccount*/)
        {
            // todo1[ak] check args
            _securityProvider = securityProvider;
            _accountRepository = accountRepository;
            _accountValidator = accountValidator;
            _timeSource = timeSource;

            _sessionManager = new SessionManager(
                _securityProvider,
                _timeSource,
                accountSessionCollectionCapacity,
                sessionRepository);

            _actionRightResolver = actionRightResolver;
            //_accountRegistrationDataToAccount = accountRegistrationDataToAccount;
        }
예제 #3
0
 public AccountService(ILogProvider log, IAccountDal dal, IAccountValidator validator, IAccountChangeHandler changeHandler, ICryptoProvider cryptoProvider)
 {
     this.log            = log;
     this.dal            = dal;
     this.changeHandler  = changeHandler;
     this.validator      = validator;
     this.cryptoProvider = cryptoProvider;
 }
 public RegistrationViewModel(
     IAccountValidator accountValidator,
     IAccountService accountService
     )
 {
     _accountValidator = accountValidator;
     _accountService   = accountService;
 }
 public ClientDataManager(IClientDataRepository clientDataRepository, IValidator validator, IExceptionHandler exceptionHandler,
                          ILogger logger, IAccountValidator accountValidator)
 {
     _clientDataRepository = clientDataRepository;
     _validator            = validator;
     _exceptionHandler     = exceptionHandler;
     _logger           = logger;
     _accountValidator = accountValidator;
 }
예제 #6
0
        public ProfileControllerTests()
        {
            validator = Substitute.For<IAccountValidator>();
            service = Substitute.For<IAccountService>();

            profileDelete = ObjectFactory.CreateProfileDeleteView();
            profileEdit = ObjectFactory.CreateProfileEditView();

            controller = Substitute.ForPartsOf<ProfileController>(validator, service);
            ReturnCurrentAccountId(controller, "Test");
        }
예제 #7
0
        public ProfileControllerTests()
        {
            validator = Substitute.For <IAccountValidator>();
            service   = Substitute.For <IAccountService>();

            profileDelete = ObjectFactory.CreateProfileDeleteView();
            profileEdit   = ObjectFactory.CreateProfileEditView();

            controller = Substitute.ForPartsOf <ProfileController>(validator, service);
            ReturnCurrentAccountId(controller, 1);
        }
예제 #8
0
        public void SetUp()
        {
            validator   = Substitute.For <IAccountValidator>();
            service     = Substitute.For <IAccountService>();
            accountEdit = new AccountEditView();
            account     = new AccountView();

            controller = Substitute.ForPartsOf <AccountsController>(service, validator);
            controller.ControllerContext           = new ControllerContext();
            controller.ControllerContext.RouteData = new RouteData();
        }
        public ProfileControllerTests()
        {
            profileEdit   = ObjectFactory.CreateProfileEditView(1);
            profileDelete = ObjectFactory.CreateProfileDeleteView(2);

            service    = Substitute.For <IAccountService>();
            validator  = Substitute.For <IAccountValidator>();
            controller = Substitute.ForPartsOf <ProfileController>(validator, service);

            controller.When(sub => { String get = sub.CurrentAccountId; }).DoNotCallBase();
            controller.CurrentAccountId.Returns("CurrentAccount");
        }
예제 #10
0
        public ProfileTests()
        {
            service       = Substitute.For <IAccountService>();
            validator     = Substitute.For <IAccountValidator>();
            profileEdit   = ObjectsFactory.CreateProfileEditView(0);
            profileDelete = ObjectsFactory.CreateProfileDeleteView(0);
            controller    = Substitute.ForPartsOf <Profile>(validator, service);

            controller.ControllerContext.HttpContext = new DefaultHttpContext();
            controller.Authorization.Returns(Substitute.For <IAuthorization>());
            controller.ControllerContext.RouteData = new RouteData();
        }
예제 #11
0
        public AccountsControllerTests()
        {
            validator = Substitute.For <IAccountValidator>();
            service   = Substitute.For <IAccountService>();

            accountCreate = ObjectFactory.CreateAccountCreateView();
            accountEdit   = ObjectFactory.CreateAccountEditView();
            account       = ObjectFactory.CreateAccountView();

            controller = Substitute.ForPartsOf <AccountsController>(validator, service);
            controller.ActionContext.RouteData = new RouteData();
        }
        public AccountsControllerTests()
        {
            validator = Substitute.For<IAccountValidator>();
            service = Substitute.For<IAccountService>();

            accountCreate = ObjectFactory.CreateAccountCreateView();
            accountEdit = ObjectFactory.CreateAccountEditView();
            account = ObjectFactory.CreateAccountView();

            controller = Substitute.ForPartsOf<AccountsController>(validator, service);
            controller.ControllerContext.RouteData = new RouteData();
        }
예제 #13
0
 public PaymentService(IDataStoreFactory dataStoreFactory,
                       IAccountValidator <AccountValidatorBacs> accountValidatorBacs,
                       IAccountValidator <AccountValidatorFasterPayments> accountValidatorFasterPayments,
                       IAccountValidator <AccountValidatorChaps> accountValidatorChaps,
                       IAppConfig appConfig)
 {
     _dataStoreFactory               = dataStoreFactory;
     _accountValidatorBacs           = accountValidatorBacs;
     _accountValidatorFasterPayments = accountValidatorFasterPayments;
     _accountValidatorChaps          = accountValidatorChaps;
     _appConfig = appConfig;
 }
예제 #14
0
        public void SetUp()
        {
            validator = Substitute.For <IAccountValidator>();
            service   = Substitute.For <IAccountService>();

            accountRecovery = ObjectFactory.CreateAccountRecoveryView();
            accountReset    = ObjectFactory.CreateAccountResetView();
            accountLogin    = ObjectFactory.CreateAccountLoginView();
            account         = new AccountView();

            controller = Substitute.ForPartsOf <AuthController>(validator, service);
            controller.ControllerContext = new ControllerContext();
        }
예제 #15
0
        public void SetUp()
        {
            validator = Substitute.For <IAccountValidator>();
            service   = Substitute.For <IAccountService>();

            profile = new ProfileEditView();
            account = new AccountView();

            controller = new ProfileController(service, validator);
            controller.ControllerContext             = new ControllerContext();
            controller.ControllerContext.HttpContext = new HttpMock().HttpContextBase;
            accountId = controller.ControllerContext.HttpContext.User.Identity.Name;
        }
예제 #16
0
        public AccountsControllerTests()
        {
            validator = Substitute.For <IAccountValidator>();
            service   = Substitute.For <IAccountService>();

            accountCreate = new AccountCreateView();
            accountEdit   = new AccountEditView();
            account       = new AccountView();

            controller = Substitute.ForPartsOf <AccountsController>(validator, service);
            controller.ControllerContext           = new ControllerContext();
            controller.ControllerContext.RouteData = new RouteData();
        }
예제 #17
0
        public void SetUp()
        {
            validator = Substitute.For <IAccountValidator>();
            service   = Substitute.For <IAccountService>();

            accountRecovery = ObjectFactory.CreateAccountRecoveryView();
            accountReset    = ObjectFactory.CreateAccountResetView();
            accountLogin    = ObjectFactory.CreateAccountLoginView();
            account         = new AccountView();

            controller     = Substitute.ForPartsOf <AuthController>(service, validator);
            controller.Url = new UrlHelper(new HttpMock().HttpContext.Request.RequestContext);
            controller.ControllerContext = new ControllerContext();
        }
예제 #18
0
 public AccountService(
     IUOW UOW,
     ILogging Logging,
     ICurrentContext CurrentContext,
     IAccountValidator AccountValidator,
     IConfiguration Configuration
     )
 {
     this.UOW              = UOW;
     this.Logging          = Logging;
     this.CurrentContext   = CurrentContext;
     this.AccountValidator = AccountValidator;
     this.Configuration    = Configuration;
 }
예제 #19
0
        public ProfileControllerTests()
        {
            validator = Substitute.For <IAccountValidator>();
            service   = Substitute.For <IAccountService>();

            profileDelete = ObjectsFactory.CreateProfileDeleteView();
            profileEdit   = ObjectsFactory.CreateProfileEditView();

            controller = Substitute.ForPartsOf <ProfileController>(validator, service);
            controller.ControllerContext.HttpContext = Substitute.For <HttpContext>();
            controller.TempData = Substitute.For <ITempDataDictionary>();
            controller.ControllerContext.RouteData = new RouteData();
            controller.Url = Substitute.For <IUrlHelper>();
            ReturnCurrentAccountId(controller, 1);
        }
예제 #20
0
        public AccountsControllerTests()
        {
            validator = Substitute.For <IAccountValidator>();
            service   = Substitute.For <IAccountService>();

            accountCreate = ObjectFactory.CreateAccountCreateView();
            accountEdit   = ObjectFactory.CreateAccountEditView();
            account       = ObjectFactory.CreateAccountView();

            Authorization.Provider       = Substitute.For <IAuthorizationProvider>();
            controller                   = Substitute.ForPartsOf <AccountsController>(validator, service);
            controller.ControllerContext = new ControllerContext {
                RouteData = new RouteData()
            };
        }
        public AuthControllerTests()
        {
            mail       = Substitute.For <IMailClient>();
            service    = Substitute.For <IAccountService>();
            validator  = Substitute.For <IAccountValidator>();
            controller = Substitute.ForPartsOf <AuthController>(validator, service, mail);
            controller.ControllerContext.HttpContext = Substitute.For <HttpContext>();
            controller.TempData = Substitute.For <ITempDataDictionary>();
            controller.ControllerContext.RouteData = new RouteData();
            controller.Url = Substitute.For <IUrlHelper>();

            accountRecovery = ObjectFactory.CreateAccountRecoveryView();
            accountReset    = ObjectFactory.CreateAccountResetView();
            accountLogin    = ObjectFactory.CreateAccountLoginView();
        }
        public AccountsControllerTests()
        {
            validator = Substitute.For <IAccountValidator>();
            service   = Substitute.For <IAccountService>();

            accountCreate = ObjectFactory.CreateAccountCreateView();
            accountEdit   = ObjectFactory.CreateAccountEditView();
            account       = ObjectFactory.CreateAccountView();

            controller = Substitute.ForPartsOf <AccountsController>(validator, service);
            controller.ControllerContext.HttpContext = Substitute.For <HttpContext>();
            controller.TempData = Substitute.For <ITempDataDictionary>();
            controller.ControllerContext.RouteData = new RouteData();
            controller.Url = Substitute.For <IUrlHelper>();
        }
        public AuthControllerTests()
        {
            mailClient = Substitute.For<IMailClient>();
            service = Substitute.For<IAccountService>();
            validator = Substitute.For<IAccountValidator>();
            controller = Substitute.ForPartsOf<AuthController>(validator, service, mailClient);
            controller.ControllerContext.HttpContext = Substitute.For<HttpContext>();
            controller.TempData = Substitute.For<ITempDataDictionary>();
            controller.ControllerContext.RouteData = new RouteData();
            controller.Url = Substitute.For<IUrlHelper>();

            accountRegister = ObjectFactory.CreateAccountRegisterView();
            accountRecovery = ObjectFactory.CreateAccountRecoveryView();
            accountReset = ObjectFactory.CreateAccountResetView();
            accountLogin = ObjectFactory.CreateAccountLoginView();
        }
예제 #24
0
        public AuthControllerTests()
        {
            mailClient = Substitute.For <IMailClient>();
            service    = Substitute.For <IAccountService>();
            validator  = Substitute.For <IAccountValidator>();
            controller = Substitute.ForPartsOf <AuthController>(validator, service, mailClient);
            HttpContextBase context = HttpContextFactory.CreateHttpContextBase();

            controller.Url = new UrlHelper(context.Request.RequestContext);
            controller.ControllerContext             = new ControllerContext();
            controller.ControllerContext.HttpContext = context;

            accountRecovery = ObjectFactory.CreateAccountRecoveryView();
            accountReset    = ObjectFactory.CreateAccountResetView();
            accountLogin    = ObjectFactory.CreateAccountLoginView();
        }
예제 #25
0
        public AuthControllerTests()
        {
            mailClient = Substitute.For<IMailClient>();
            service = Substitute.For<IAccountService>();
            validator = Substitute.For<IAccountValidator>();
            controller = Substitute.ForPartsOf<AuthController>(validator, service, mailClient);

            accountRegister = ObjectFactory.CreateAccountRegisterView();
            accountRecovery = ObjectFactory.CreateAccountRecoveryView();
            accountReset = ObjectFactory.CreateAccountResetView();
            accountLogin = ObjectFactory.CreateAccountLoginView();

            HttpContextBase httpContext = HttpContextFactory.CreateHttpContextBase();
            controller.Url = new UrlHelper(httpContext.Request.RequestContext);
            controller.ControllerContext = new ControllerContext();
            controller.ControllerContext.HttpContext = httpContext;
        }
예제 #26
0
 public void SetPasswordValidator(IAccountValidator service)
 {
     this._AccountValidator = service;
 }
 public AccountsRepository(IAccountValidator validator, IMapper mapper, FoodDeliveryDbContext dbContext) : base(dbContext, validator, mapper)
 {
 }
예제 #28
0
 public AccountService(IAccountRepository _accountRepository, IAccountValidator _accountValidator)
 {
     _repository = _accountRepository;
     _validator  = _accountValidator;
 }
 public AccountController()
 {
     _userHelper       = new UserModelHelper();
     _accountValidator = new AccountValidator();
 }
예제 #30
0
 public BankAccountWithValidator()
 {
     _validator = new SimpleValidator(1000000);
 }
 public WindowDialogService(IAccountRepository accountRepository, IAccountValidator accountValidator)
 {
     _accountRepository = accountRepository;
     _accountValidator  = accountValidator;
 }
예제 #32
0
 public void SetAccountValidator(IAccountValidator accValidator)
 {
     _AccountValidator = accValidator;
 }