Exemple #1
0
        public void Return_False_User_Does_Not_Logged_Does_Not_Have_FirstName_LastName()
        {
            var sut = new UserControllerBuilder().Build();

            UserProfile user = new UserProfileBuilder()
                               .WithFirstName(string.Empty)
                               .WithoutNames();


            var result = sut.Login(user);

            result.Should().BeFalse();
        }
Exemple #2
0
        public void Return_True_User_Logged_Successfully()
        {
            var sut = new UserControllerBuilder()
                      .WithUserService(new UserServices(new EmailService()))
                      .Build();

            var user = new UserProfileBuilder()
                       .Build();

            var result = sut.Login(user);

            result.Should().BeTrue();
        }
Exemple #3
0
        public void Return_False_User_Does_Not_Logged_Successfully()
        {
            var sut = new UserControllerBuilder()
                      .WithRealServices(new UserServices(new EmailService()), new ReverseEncryption())
                      .Build();

            var userTest = new UserProfileBuilder()
                           .WithNonMatchingPasswords()
                           .Build();

            var result = sut.Login(userTest);

            result.Should().BeFalse();
        }