#include "GameDependencies.h" #include "PropertyEntranceComponent.h" #include "ePropertySortType.h" #include // The property browser's reply says whether the list it answers was the friends list. Live sent wasFriends 1 on every // reply to a sort 5 query and 0 on the replies to sort 1 (reputation) and sort 3 (recent). TEST(PropertyEntranceComponentTests, WasFriendsFollowsTheSortMethod) { EXPECT_TRUE(PropertyEntranceComponent::IsFriendsSort(SORT_TYPE_FEATURED)); EXPECT_TRUE(PropertyEntranceComponent::IsFriendsSort(SORT_TYPE_FRIENDS)); EXPECT_FALSE(PropertyEntranceComponent::IsFriendsSort(SORT_TYPE_REPUTATION)); EXPECT_FALSE(PropertyEntranceComponent::IsFriendsSort(SORT_TYPE_RECENT)); } // The friends list shows closed properties too (the client draws a lock on them); selecting one must still go nowhere. // Access types: 0 private, 1 friends, 2 public. TEST(PropertyEntranceComponentTests, ClosedPropertiesInTheListCannotBeVisited) { EXPECT_FALSE(PropertyEntranceComponent::CanVisit(0, false)); EXPECT_FALSE(PropertyEntranceComponent::CanVisit(0, true)); EXPECT_FALSE(PropertyEntranceComponent::CanVisit(1, false)); EXPECT_TRUE(PropertyEntranceComponent::CanVisit(1, true)); EXPECT_TRUE(PropertyEntranceComponent::CanVisit(2, false)); EXPECT_TRUE(PropertyEntranceComponent::CanVisit(2, true)); }