Пример #1
0
        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>());
        }
Пример #2
0
        public void GivenUserConfirmationEmail_WhenReceivesCorrectData_ThenShouldPublishSendEmailEvent()
        {
            var userConfirmationEmail = new UserConfirmationEmail(_mockUserManager, _mockEmailBuilder, _mockEventBus);

            userConfirmationEmail.Send(_user);

            _mockEventBus.Received().Publish(Arg.Any <SendEmailEvent>());
        }
Пример #3
0
        public void GivenUserConfirmationEmail_WhenReceivesCorrectData_ThenShouldCallUserManagerToGenerateToken()
        {
            var userConfirmationEmail = new UserConfirmationEmail(_mockUserManager, _mockEmailBuilder, _mockEventBus);

            userConfirmationEmail.Send(_user);

            _mockUserManager.Received().GenerateEmailConfirmationTokenAsync(_user);
        }