public void it_should_return_false() { var user = new User.User(); var otherUser = new User.User(); Assert.That(user.IsFriendsWith(otherUser), Is.False); }
public void Inform_when_users_are_not_friends() { var friend = new User.User(); var anotherUser = new User.User(); Assert.IsFalse(friend.IsFriendsWith(anotherUser)); }
public void it_should_return_true() { var user = new User.User(); var otherUser = new User.User(); user.AddFriend(otherUser); Assert.That(user.IsFriendsWith(otherUser), Is.True); }
public void Inform_when_users_are_friends() { var friend = new User.User(); var anotherUser = new User.User(); friend.AddFriend(anotherUser); Assert.IsTrue(friend.IsFriendsWith(anotherUser)); }
public List <Trip> GetTripsByUser(User.User user) { var loggedUser = _userSession.GetLoggedUser(); if (loggedUser == null) { throw new UserNotLoggedInException(); } if (!user.IsFriendsWith(loggedUser)) { return(new List <Trip>()); } return(_userTripFinder.FindTripsByUser(user)); }
public List <Trip> GetFriendsTrips(User.User friend, User.User loggedInUser) { CheckThatUserIsLoggedIn(loggedInUser); return(friend.IsFriendsWith(loggedInUser) ? _tripDao.FindUsersTrips(friend) : NoTrips()); }