public async Task <ActionResult> Create(EmailModel email) { var emailDto = _mapper.Map <Email>(email); await _emailManager.Create(emailDto); return(Ok()); }
public async Task GivenEmail_WhenCreate_ThenCreateSuccessful() { //?Given var email = new Email { Id = "1234", UserName = "******", CreationTime = new DateTime() }; //?When await _emailManager.Create(email); //?Then _mockRepository.Verify(t => t.Create(It.Is <Email>(e => EmailIsWellCreated(e, email))), Times.Once); }