public When_a_user_is_successfully_logged_in()
 {
     var username = "******";
     var password = "******";
     Repository = new InMemoryRepository<User>(SecurityHelper.GetUserList());
     UserService = new UsersService(Repository);
     CurrentUser = UserService.LoginUser(username, password);
 }
Ejemplo n.º 2
0
 public void If_a_user_cant_log_in_logged_in_property_of_the_user_should_be_false()
 {
     var username = "******";
     var password = "******";
     var repo = new InMemoryRepository<User>(SecurityHelper.GetUserList());
     var userService = new UsersService(repo);
     var user = userService.LoginUser(username, password);
     user.LoggedIn.Should().BeFalse();
 }
Ejemplo n.º 3
0
 public void Can_log_in_using_username_and_password()
 {
     var username = "******";
     var password = "******";
     var repo = new InMemoryRepository<User>(SecurityHelper.GetUserList());
     var userService = new UsersService(repo);
     var user = userService.LoginUser(username, password);
     user.LoggedIn.Should().BeTrue();
 }