public void SaveUserShouldCallRepository()
        {
            UserDto userDto = new UserDto();
            m_UserRepositoryMock = new Mock<IUserRepository>();
            m_BetRepositoryMock = new Mock<IBetRepository>();
            m_MatchRepositoryMock = new Mock<IMatchRepository>();
            m_UserService = new UserService(m_UserRepositoryMock.Object, m_BetRepositoryMock.Object, m_MatchRepositoryMock.Object);

            m_UserService.CreateUser(userDto);

            m_UserRepositoryMock.Verify(x => x.PersistUser(It.IsAny<User>()), Times.Once);
        }
Ejemplo n.º 2
0
 public async Task CreateUser(UserDto user)
 {
     await m_UserRepository.PersistUser(Mapper.Map<User>(user)).ConfigureAwait(false);
 }
Ejemplo n.º 3
0
 public async Task<HttpResponseMessage> Create(UserDto user)
 {
     await m_UserSevice.CreateUser(user).ConfigureAwait(false);
     return Request.CreateResponse(HttpStatusCode.Created);
 }