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; }
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>(); }
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); }
private void InitizalizeAddLogic() { _addUserRule = new AddUserRule(); _addUserLogic = new AddUserLogic(_addUserRule); _addUserService = new AddUserService(_uow, _userRepository, _addUserLogic); }
public void Initialize() { addUserRule = new AddUserRule(); addUserLogic = new AddUserLogic(addUserRule); userAll = GetAllUsersFictitius(); }