public void GetCommonDuelsGivesGivesEmptyWhenNoCommonDuels() { var api = new GameStatsApi(storage); var duels = api.GetCommonDuels(3, 4); Assert.Equal(new Duel[] {}, duels); }
public void GetClassRatingReturnsCorrectValues() { var api = new GameStatsApi(storage); Assert.Equal(30, api.GetClassRating("Barbarian")); Assert.Equal(31, api.GetClassRating("Rogue")); Assert.Equal(31, api.GetClassRating("Wizard")); Assert.Equal(0, api.GetClassRating("Knight")); }
public void GetClassPopularityReturnsCorrectValues() { var api = new GameStatsApi(storage); var classPop = api.GetCharacterClassPopularity(); Assert.Equal(Percent(3, 14), classPop["Rogue"]); Assert.Equal(Percent(3, 14), classPop["Knight"]); Assert.Equal(Percent(5, 14), classPop["Wizard"]); Assert.Equal(Percent(3, 14), classPop["Barbarian"]); }
public void GetAllUsersVictoriesReturnsCorrectValues() { var api = new GameStatsApi(storage); var usersVictories = api.GetVictoryCountPerUser(); Assert.Equal(2, usersVictories[storage.Users[0]]); Assert.Equal(1, usersVictories[storage.Users[1]]); Assert.Equal(2, usersVictories[storage.Users[2]]); Assert.Equal(1, usersVictories[storage.Users[3]]); Assert.Equal(0, usersVictories[storage.Users[4]]); }
public void GetFriendsOnlineGivesEmptyWhenNoFriends() { var api = new GameStatsApi(storage); var friends = api.GetFriendsOnline(1); Assert.Equal(new List<User>(), friends); }
public void GetCommonDuelsGivesListOfDuels() { var api = new GameStatsApi(storage); var duels = api.GetCommonDuels(0, 1); Assert.Equal(new [] {storage.Duels[0], storage.Duels[1]}, duels); }
public void GetFriendsOnlineGivesListOfContacts() { var api = new GameStatsApi(storage); var friends = api.GetFriendsOnline(0); Assert.Equal(storage.Users[0].Friends, friends); }