Esempio n. 1
0
 public void GivenAStatusAction_ThenRendersTheDefaultView()
 {
     // Arrange
     var controller = new AccountController(CurrentUserManagerMock.Object, CurrentSignInManagerMock.Object);
     // Act
     controller.WithCallTo(c => c.Status())
         // Assert
         .ShouldRenderDefaultView();
 }
Esempio n. 2
0
 public void GivenAResendVerificationCodeAction_WhenAnonymousUser_ThenRendersTheDefaultView()
 {
     // Arrange
     var controller = new AccountController(CurrentUserManagerMock.Object, CurrentSignInManagerMock.Object);
     // Act
     controller.WithCallTo(c => c.ResendVerificationCode("*****@*****.**"))
         // Assert
         .ShouldRenderDefaultView();
 }
Esempio n. 3
0
        public void GivenAResendVerificationCodeAction_ThenRendersTheDefaultView()
        {
            // Arrange
            var controller = new AccountController(CurrentUserManagerMock.Object, CurrentSignInManagerMock.Object);

            // Act
            controller.WithCallTo(c => c.ResendVerificationCode(ApplicationMessages.VerificationCodeResent))
                // Assert
                .ShouldRenderDefaultView();
        }
Esempio n. 4
0
 public void GivenAResendVerificationCodeAction_WhenTheModelStateIsNotValid_ThenRendersTheDefaultView()
 {
     // Arrange
     var controller = new AccountController(CurrentUserManagerMock.Object, CurrentSignInManagerMock.Object);
     // Act
     var model = new ResendVerifyCodeViewModel();
     controller.ModelState.AddModelError("", "Some kind of error");
     controller.WithCallTo(c => c.ResendVerificationCode(model))
         // Assert
         .ShouldRenderDefaultView();
 }
Esempio n. 5
0
 public void GivenAResendVerificationCodeAction_WhenTheModelStateIsValid_ThenItRedirectsToVerifyRegsitrationCode()
 {
     // Arrange
     var controller = new AccountController(CurrentUserManagerMock.Object, CurrentSignInManagerMock.Object);
     // Act
     var model = new ResendVerifyCodeViewModel()
     {
         Email = "*****@*****.**",
     };
     controller.WithCallTo(c => c.ResendVerificationCode(model))
         // Assert
         .ShouldRedirectTo<AccountController>(c => c.VerifyRegistrationCode(new VerifyCodeViewModel()));
 }