Exemplo n.º 1
0
 public AddUserService(
     IUnitOfWork uow,
     IUserRepository userRepository,
     IAddUserLogic userLogic
     )
 {
     if (uow == null || userRepository == null || userLogic == null)
     {
         throw new ArgumentNullException(Resource.ExceptionNullObject);
     }
     _uow            = uow;
     _userRepository = userRepository;
     _userLogic      = userLogic;
 }
Exemplo n.º 2
0
 public void Initialize()
 {
     _dataFactory       = MockRepository.GenerateStub <IDataFactory>();
     _uow               = MockRepository.GenerateStub <IUnitOfWork>();
     _userRepository    = MockRepository.GenerateStub <IUserRepository>();
     _addUserRule       = MockRepository.GenerateStub <IAddUserRule>();
     _addUserLogic      = MockRepository.GenerateStub <IAddUserLogic>();
     _addUserService    = MockRepository.GenerateStub <IAddUserService>();
     _getUserLogic      = MockRepository.GenerateStub <IGetUserLogic>();
     _getUserService    = MockRepository.GenerateStub <IGetUserService>();
     _updateUserRule    = MockRepository.GenerateStub <IUpdateUserRule>();
     _updateUserLogic   = MockRepository.GenerateStub <IUpdateUserLogic>();
     _updateUserService = MockRepository.GenerateStub <IUpdateUserService>();
     _deleteUserLogic   = MockRepository.GenerateStub <IDeleteUserLogic>();
     _deleteUserService = MockRepository.GenerateStub <IDeleteUserService>();
 }
Exemplo n.º 3
0
 public void Initialize()
 {
     _dataFactory       = new DataFactory();
     _uow               = new UnitOfWork(_dataFactory);
     _userRepository    = new UserRepository(_dataFactory);
     _addUserRule       = new AddUserRule();
     _addUserLogic      = new AddUserLogic(_addUserRule);
     _addUserService    = new AddUserService(_uow, _userRepository, _addUserLogic);
     _getUserLogic      = new GetUserLogic();
     _getUserService    = new GetUserService(_userRepository, _getUserLogic);
     _updateUserRule    = new UpdateUserRule();
     _updateUserLogic   = new UpdateUserLogic(_updateUserRule, _getUserLogic);
     _updateUserService = new UpdateUserService(_uow, _userRepository, _updateUserLogic);
     _deleteUserLogic   = new DeleteUserLogic(_getUserLogic);
     _deleteUserService = new DeleteUserService(_uow, _userRepository, _deleteUserLogic);
 }
Exemplo n.º 4
0
 private void InitizalizeAddLogic()
 {
     _addUserRule    = new AddUserRule();
     _addUserLogic   = new AddUserLogic(_addUserRule);
     _addUserService = new AddUserService(_uow, _userRepository, _addUserLogic);
 }
Exemplo n.º 5
0
 public void Initialize()
 {
     addUserRule  = new AddUserRule();
     addUserLogic = new AddUserLogic(addUserRule);
     userAll      = GetAllUsersFictitius();
 }