예제 #1
0
 public UsersController(IWorkContext webWorkContext,
                        UserService userService,
                        LocalizationService localizationService,
                        IAuthenticationService authenticationService,
                        UserValidateService userValidateService)
 {
     _webWorkContext        = webWorkContext;
     _userService           = userService;
     _localizationService   = localizationService;
     _authenticationService = authenticationService;
     _userValidateService   = userValidateService;
 }
예제 #2
0
 public UserController(IWorkContext webWorkContext,
                       UserService userService,
                       LocalizationService localizationService,
                       IAuthenticationService authenticationService,
                       UserValidateService userValidateService,
                       HttpContextBase httpContext)
 {
     _webWorkContext        = webWorkContext;
     _userService           = userService;
     _localizationService   = localizationService;
     _authenticationService = authenticationService;
     _userValidateService   = userValidateService;
     _httpContext           = httpContext;
 }
        public void UserValidateServiceLoginOfUserIsNullOrEmptyTest()
        {
            // Arrange
            var fakerNewUsers = new FakeUsers(
                usersCount: 1,
                isFirstNameNullOrEmpty: false,
                isLastNameNullOrEmpty: false,
                isLoginNullOrEmpty: true,
                isPasswordNullOrEmpty: false,
                minLoginLenght: 5,
                minPasswordLenght: 5);
            var userValidateService = new UserValidateService();

            // Act
            var resultUserValidationBeforRegistration =
                _userValidateService.UserValidateOnAddition(fakerNewUsers.Users[0]);

            // Assert
            resultUserValidationBeforRegistration.Should().BeFalse();
        }
 public void SetUp()
 {
     _userValidateService = new UserValidateService();
 }