示例#1
0
 public UserService(IDeleteUserCommand deleteUserCommand,
                    IUpdateUserCommand updateUserCommand,
                    ICreateUserCommand createUserCommand,
                    IGetUserByIdQuery getUserByIdQuery,
                    IGetAllNonDeletedUsersQuery getAllNonDeletedUsersQuery,
                    IGetUserByUsernameQuery getUserByUsernameQuery, 
                    IGetUserByEmailQuery getUserByEmailQuery)
 {
     _deleteUserCommand = deleteUserCommand;
     _updateUserCommand = updateUserCommand;
     _createUserCommand = createUserCommand;
     _getUserByIdQuery = getUserByIdQuery;
     _getAllNonDeletedUsersQuery = getAllNonDeletedUsersQuery;
     _getUserByUsernameQuery = getUserByUsernameQuery;
     _getUserByEmailQuery = getUserByEmailQuery;
 }
 public void Setup()
 {
     _userByEmailQuery = Substitute.For<IUserByEmailQuery>();
     _createUserCommand = Substitute.For<ICreateUserCommand>();
     _deleteUserCommand = Substitute.For<IDeleteUserCommand>();
 }
        public void Setup()
        {
            _fixture = new Fixture();
            _fixture.Customize(new AutoNSubstituteCustomization());

            _userByEmailQuery = _fixture.Freeze<IUserByEmailQuery>();
            _createUserCommand = _fixture.Freeze<ICreateUserCommand>();
        }