Пример #1
0
 public void LoginUser_WithUserNoUsername_ThrowsException()
 {
     var user = new User()
     {
         Password = "******"
     };
     var service = new LoginService();
     service.LoginUser(user);
 }
Пример #2
0
        public void LoginUser_WithUserCredentialsInValid_ThrowException()
        {
            var user = new User()
            {
                Username = "******",
                Password = "******"
            };
            var service = new LoginService();

            service.LoginUser(user);
        }
Пример #3
0
 public void LoginUser_WithUserCredentialsValid_ReturnsListOfUsers()
 {
     var user = new User()
     {
         Username = "******",
         Password = "******"
     };
     var service = new LoginService();
     var users = service.LoginUser(user);
     Assert.IsNotNull(users);
     Assert.IsInstanceOfType(users, typeof(List<User>));
     Assert.IsTrue(users.All(x => x.IsLoggedIn));
 }
Пример #4
0
 public void LogoutUser_WithLoggedInUser_ReturnsNull()
 {
     var user = new User()
     {
         Username = "******"
     };
     var service = new LoginService();
     service.LogoutUser(user);
 }
Пример #5
0
 public void LoginUser_WithNoUser_ThrowsException()
 {
     var service = new LoginService();
     service.LoginUser(null);
 }
Пример #6
0
 public void SignUpUser_WithUserNoPassword_ThrowsException()
 {
     var user = new User()
     {
         Username = "******"
     };
     var service = new LoginService();
     service.SignUpUser(user);
 }
Пример #7
0
 public void SignUpUser_WithUserCredentialsValid_ReturnsListOfUsers()
 {
     var user = new User()
     {
         Username = "******",
         Password = "******"
     };
     var service = new LoginService();
     Assert.IsInstanceOfType(service.SignUpUser(user), typeof(List<User>));
 }