public void GivenUserConfirmationEmail_WhenReceivesCorrectData_ThenShouldCallEmailBuilderService() { var userConfirmationEmail = new UserConfirmationEmail(_mockUserManager, _mockEmailBuilder, _mockEventBus); userConfirmationEmail.Send(_user); _mockEmailBuilder.Received().ConfirmationEmail(Arg.Any <string>(), Arg.Any <string>(), Arg.Any <string>()); }
public void GivenUserConfirmationEmail_WhenReceivesCorrectData_ThenShouldPublishSendEmailEvent() { var userConfirmationEmail = new UserConfirmationEmail(_mockUserManager, _mockEmailBuilder, _mockEventBus); userConfirmationEmail.Send(_user); _mockEventBus.Received().Publish(Arg.Any <SendEmailEvent>()); }
public void GivenUserConfirmationEmail_WhenReceivesCorrectData_ThenShouldCallUserManagerToGenerateToken() { var userConfirmationEmail = new UserConfirmationEmail(_mockUserManager, _mockEmailBuilder, _mockEventBus); userConfirmationEmail.Send(_user); _mockUserManager.Received().GenerateEmailConfirmationTokenAsync(_user); }