public void Arrange() { _login = new LoginModel {EmailAddress = _emailAddress, Password = _password}; _mother = new ObjectMother(); _account = _mother.GetAccountByEmailAddress(_emailAddress, _password); _currentPlayer = new Player { Account = _account, Name = "Player1" }; _accountRepository = new InMemoryRepository<Account>(_account); _playerRepository = new InMemoryRepository<Player>(_currentPlayer); _formsService = MockRepository.GenerateMock<IFormsService>(); _controller = new AccountController(_accountRepository, _playerRepository, _formsService); }
public void SetUp() { var mother = new ObjectMother(); _model = mother.GetValidAccount(); _existingAccount = mother.GetAccountByEmailAddress(_model.EmailAddress); _newModel = mother.GetValidAccount(); _newModel.EmailAddress = "*****@*****.**"; _accountRepository = new InMemoryRepository<Account>(_existingAccount); _formsService = MockRepository.GenerateMock<IFormsService>(); _playerRepository = MockRepository.GenerateMock<IRepository<Player>>(); _controller = new AccountController(_accountRepository, _playerRepository, _formsService); }