public void Should_return_list_of_trips_when_logged_user_is_a_friend_of_another_user() { var loggedUser = new User.User(); var anotherUser = new User.User(); var anotherUserTrip = new Trip.Trip(); anotherUser.AddFriend(loggedUser); anotherUser.AddTrip(anotherUserTrip); var tripService = new TestableTripService(loggedUser); var trips = tripService.GetTripsByUser(anotherUser); CollectionAssert.AreEquivalent(new List <Trip.Trip> { anotherUserTrip }, trips); }
public void AddTrip(Trip.Trip trip) { trips.Add(trip); }