Beispiel #1
0
        public void Recover_DoesNotSendRecoveryInformation()
        {
            AccountRecoveryView account = ObjectFactory.CreateAccountRecoveryView();

            account.Email = "*****@*****.**";

            service.Recover(account);

            mailClient.DidNotReceive().Send(Arg.Any <String>(), Arg.Any <String>(), Arg.Any <String>());
        }
Beispiel #2
0
        public async Task Recover_NullToken_DoesNotSendRecoveryInformation()
        {
            service.Recover(accountRecovery).ReturnsNull();
            service.IsLoggedIn(controller.User).Returns(false);
            validator.CanRecover(accountRecovery).Returns(true);

            await controller.Recover(accountRecovery);

            await mail.DidNotReceive().SendAsync(Arg.Any <String>(), Arg.Any <String>(), Arg.Any <String>());
        }
        public void Recover_NullToken_DoesNotSendRecoveryInformation()
        {
            service.IsLoggedIn(controller.User).Returns(false);
            validator.CanRecover(accountRecovery).Returns(true);
            service.Recover(accountRecovery).Returns(null as String);

            controller.Recover(accountRecovery).Wait();

            mailClient.DidNotReceive().SendAsync(Arg.Any <String>(), Arg.Any <String>(), Arg.Any <String>());
        }