Exemple #1
0
        public void NotSent_NotVerified()
        {
            const string phoneNumber = "0123456789";
            var          viewModel   = new ForgottenEmailViewModel
            {
                PhoneNumber = phoneNumber
            };

            var candidateService = new Mock <ICandidateService>();

            candidateService.Setup(cs => cs.RequestEmailReminder(phoneNumber)).Throws(new CustomException(Domain.Entities.ErrorCodes.EntityStateError));
            var provider = new CandidateServiceProviderBuilder().With(candidateService).Build();

            var sent = provider.RequestEmailReminder(viewModel);

            sent.Should().BeFalse();
        }
Exemple #2
0
        public void Sent()
        {
            const string phoneNumber = "0123456789";
            var          viewModel   = new ForgottenEmailViewModel
            {
                PhoneNumber = phoneNumber
            };

            var candidateService = new Mock <ICandidateService>();

            candidateService.Setup(cs => cs.RequestEmailReminder(phoneNumber));
            var provider = new CandidateServiceProviderBuilder().Build();

            var sent = provider.RequestEmailReminder(viewModel);

            sent.Should().BeTrue();
        }