Example #1
0
        public void TestPlayerRegister()
        {
            var playerMock      = MockRepository.GenerateMock <IPlayerRepository>();
            var palyerValidator = MockRepository.GenerateMock <IPlayerValidator>();

            palyerValidator.Stub(x => x.EmailValidator(_player)).Return(false);
            var playerRegistrionService = new RegistorPlayerService(playerMock, palyerValidator);

            playerRegistrionService.PlayerRegistration(_player);
            playerMock.AssertWasCalled(x => x.Save(_player));
        }
Example #2
0
        public PlayerController()
        {
            _playerRop = new PlayerRepository();

            _playerRegistrationService = new RegistorPlayerService(new PlayerRepository(), new PlayerValidator());
        }