removed unit tests
This commit is contained in:
@@ -1,13 +0,0 @@
|
|||||||
require 'test/unit'
|
|
||||||
require 'sightstone'
|
|
||||||
|
|
||||||
class BaseTest < Test::Unit::TestCase
|
|
||||||
|
|
||||||
@@sightstone = Sightstone::Sightstone.new("your_api_key_here")
|
|
||||||
|
|
||||||
@@req_id = 30447079
|
|
||||||
@@test_id_array = [30447079,30447079,30447079]
|
|
||||||
@@test_name = "danijoo"
|
|
||||||
@@test_name2 = "pippu"
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
require 'test/unit'
|
|
||||||
require 'sightstone'
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class ChampionModuleTest < BaseTest
|
|
||||||
|
|
||||||
def test_champions
|
|
||||||
begin
|
|
||||||
champions = @@sightstone.champion.champions
|
|
||||||
rescue Sightstone::RateLimitExceededException
|
|
||||||
puts "Rate limit exeeded, waiting 1 sec"
|
|
||||||
sleep 1
|
|
||||||
retry
|
|
||||||
end
|
|
||||||
assert_instance_of(Array, champions)
|
|
||||||
if(champions.size > 0)
|
|
||||||
_check_champion(champions[0])
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_free_to_play
|
|
||||||
begin
|
|
||||||
champions = @@sightstone.champion.champions :free_to_play => true
|
|
||||||
rescue Sightstone::RateLimitExceededException
|
|
||||||
puts "Rate limit exeeded, waiting 1 sec"
|
|
||||||
sleep 1
|
|
||||||
retry
|
|
||||||
end
|
|
||||||
champions.each do |champ|
|
|
||||||
assert_equal(true, champ.freeToPlay)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def _check_champion(champ)
|
|
||||||
assert_instance_of(Sightstone::Champion, champ)
|
|
||||||
assert_instance_of(Fixnum, champ.attackRank)
|
|
||||||
assert_instance_of(Fixnum, champ.defenseRank)
|
|
||||||
assert_instance_of(String, champ.name)
|
|
||||||
assert_instance_of(Fixnum, champ.id)
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
require 'test/unit'
|
|
||||||
require 'sightstone'
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class GameModuleTest < BaseTest
|
|
||||||
|
|
||||||
def test_recent_games
|
|
||||||
begin
|
|
||||||
matchHistory = @@sightstone.game.recent(@@req_id)
|
|
||||||
rescue Sightstone::RateLimitExceededException
|
|
||||||
puts "Rate limit exeeded, waiting 1 sec"
|
|
||||||
sleep 1
|
|
||||||
retry
|
|
||||||
end
|
|
||||||
assert_instance_of(Sightstone::MatchHistory, matchHistory)
|
|
||||||
assert_instance_of(Fixnum, matchHistory.summonerId)
|
|
||||||
assert_instance_of(Array, matchHistory.games)
|
|
||||||
matchHistory.games.each do |game|
|
|
||||||
_check_game game
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def _check_game(game)
|
|
||||||
assert_instance_of(Sightstone::HistoryGame, game)
|
|
||||||
assert_instance_of(Fixnum, game.createDate)
|
|
||||||
assert_instance_of(Fixnum, game.championId)
|
|
||||||
assert_instance_of(Fixnum, game.gameId)
|
|
||||||
assert_instance_of(String, game.gameType)
|
|
||||||
assert(game.invalid || !game.invalid)
|
|
||||||
assert_instance_of(Fixnum, game.level)
|
|
||||||
assert_instance_of(Fixnum, game.mapId)
|
|
||||||
assert_instance_of(Fixnum, game.spell1)
|
|
||||||
assert_instance_of(Fixnum, game.spell2)
|
|
||||||
assert_instance_of(String, game.subType)
|
|
||||||
assert_instance_of(Fixnum, game.teamId)
|
|
||||||
assert_instance_of(Array, game.fellowPlayers)
|
|
||||||
_check_statistics(game.statistics)
|
|
||||||
_check_fellows(game.fellowPlayers)
|
|
||||||
end
|
|
||||||
|
|
||||||
def _check_statistics(stats)
|
|
||||||
assert_instance_of(Hash, stats)
|
|
||||||
stats.each do |key, stat|
|
|
||||||
assert_instance_of(String, key)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def _check_fellows(fellows)
|
|
||||||
fellows.each do |fellow|
|
|
||||||
assert_instance_of(Sightstone::Player, fellow)
|
|
||||||
assert_instance_of(Fixnum, fellow.championId)
|
|
||||||
assert_instance_of(Fixnum, fellow.summonerId)
|
|
||||||
assert_instance_of(Fixnum, fellow.teamId)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,79 +0,0 @@
|
|||||||
require 'test/unit'
|
|
||||||
require 'sightstone'
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class LeagueModuleTest < BaseTest
|
|
||||||
|
|
||||||
def test_league
|
|
||||||
begin
|
|
||||||
leagues = @@sightstone.league.leagues(@@req_id)
|
|
||||||
rescue Sightstone::RateLimitExceededException
|
|
||||||
puts "Rate limit exeeded, waiting 1 sec"
|
|
||||||
sleep 1
|
|
||||||
retry
|
|
||||||
end
|
|
||||||
leagues.each do |league|
|
|
||||||
assert_instance_of(Sightstone::League, league)
|
|
||||||
|
|
||||||
# check the league entries
|
|
||||||
_check_league(league)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_entry
|
|
||||||
begin
|
|
||||||
entries = @@sightstone.league.league_entries(@@req_id)
|
|
||||||
rescue Sightstone::RateLimitExceededException
|
|
||||||
puts "Rate limit exeeded, waiting 1 sec"
|
|
||||||
sleep 1
|
|
||||||
retry
|
|
||||||
end
|
|
||||||
entries.each do |entry|
|
|
||||||
assert_instance_of(Sightstone::LeagueItem, entry)
|
|
||||||
|
|
||||||
# check the league entries
|
|
||||||
_check_league_item(entry)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def _check_league(league)
|
|
||||||
assert_instance_of String, league.name
|
|
||||||
assert_instance_of String, league.queue
|
|
||||||
assert_instance_of String, league.tier
|
|
||||||
assert_instance_of Array, league.entries
|
|
||||||
assert_instance_of String, league.participantId
|
|
||||||
league.entries.each do |entry|
|
|
||||||
_check_league_item entry
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def _check_league_item(item)
|
|
||||||
assert_instance_of Sightstone::LeagueItem, item
|
|
||||||
assert (item.isFreshBlood == true or item.isFreshBlood == false), "#{item.isFreshBlood} should be a boolean"
|
|
||||||
assert (item.isHotStreak == true or item.isHotStreak == false), "#{item.isHotStreak} should be a boolean"
|
|
||||||
assert (item.isInactive == true or item.isInactive == false), "#{item.isInactive} should be a boolean"
|
|
||||||
assert (item.isVeteran == true or item.isVeteran == false), "#{item.isVeteran} should be a boolean"
|
|
||||||
assert_instance_of Fixnum, item.lastPlayed
|
|
||||||
assert_instance_of String, item.leagueName
|
|
||||||
assert_instance_of Fixnum, item.leaguePoints
|
|
||||||
assert_instance_of String, item.playerOrTeamId
|
|
||||||
assert_instance_of String, item.playerOrTeamName
|
|
||||||
assert_instance_of String, item.queueType
|
|
||||||
assert_instance_of String, item.rank
|
|
||||||
assert_instance_of String, item.tier
|
|
||||||
assert_instance_of Fixnum, item.wins
|
|
||||||
|
|
||||||
_check_miniseries(item.miniSeries) unless item.miniSeries.nil?
|
|
||||||
end
|
|
||||||
|
|
||||||
def _check_miniseries(ms)
|
|
||||||
assert_instance_of Sightstone::MiniSeries, ms
|
|
||||||
assert_instance_of Fixnum, ms.losses
|
|
||||||
assert_instance_of Fixnum, ms.wins
|
|
||||||
assert_instance_of Fixnum, ms.target
|
|
||||||
assert_instance_of Fixnum, ms.timeLeftToPlayMillis
|
|
||||||
assert_instance_of String, ms.progress
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
require 'test/unit'
|
|
||||||
require 'sightstone'
|
|
||||||
|
|
||||||
class StatsModuleTest < BaseTest
|
|
||||||
|
|
||||||
def test_summary
|
|
||||||
begin
|
|
||||||
summary = @@sightstone.stats.summary @@req_id
|
|
||||||
rescue Sightstone::RateLimitExceededException
|
|
||||||
puts "Rate limit exeeded, waiting 1 sec"
|
|
||||||
sleep 1
|
|
||||||
retry
|
|
||||||
end
|
|
||||||
assert_instance_of(Sightstone::PlayerStatsSummaryList, summary)
|
|
||||||
assert_instance_of(Fixnum, summary.summonerId)
|
|
||||||
assert_instance_of(Array, summary.playerStatSummaries)
|
|
||||||
summary.playerStatSummaries.each do |summary|
|
|
||||||
_check_summary(summary)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def _check_summary(sum)
|
|
||||||
assert_instance_of(Sightstone::PlayerStatSummary, sum)
|
|
||||||
assert_instance_of(Fixnum, sum.wins)
|
|
||||||
assert_instance_of(Fixnum, sum.modifyDate)
|
|
||||||
assert_instance_of(String, sum.playerStatSummaryType)
|
|
||||||
assert_instance_of(Hash, sum.aggregatedStats)
|
|
||||||
keys = sum.aggregatedStats.keys
|
|
||||||
keys.each do |key|
|
|
||||||
assert_instance_of(Fixnum, sum.aggregatedStats[key])
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_ranked_stats
|
|
||||||
begin
|
|
||||||
stats = @@sightstone.stats.ranked @@req_id
|
|
||||||
rescue Sightstone::RateLimitExceededException
|
|
||||||
puts "Rate limit exeeded, waiting 1 sec"
|
|
||||||
sleep 1
|
|
||||||
retry
|
|
||||||
end
|
|
||||||
assert_instance_of(Fixnum, stats.summonerId)
|
|
||||||
assert_instance_of(Fixnum, stats.modifyDate)
|
|
||||||
assert_instance_of(Hash, stats.champions)
|
|
||||||
keys = stats.champions.keys
|
|
||||||
keys.each do |champId|
|
|
||||||
assert_instance_of(Hash, stats.champions[champId])
|
|
||||||
statkeys = stats.champions[champId].keys
|
|
||||||
statkeys.each do |statkey|
|
|
||||||
assert_instance_of(String, statkey)
|
|
||||||
assert_instance_of(Fixnum, stats.champions[champId][statkey])
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,204 +0,0 @@
|
|||||||
require 'test/unit'
|
|
||||||
require 'sightstone'
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class SummonerModuleTest < BaseTest
|
|
||||||
|
|
||||||
def _check_summoner_validity(s)
|
|
||||||
assert_instance_of(String, s.name)
|
|
||||||
assert_instance_of(Fixnum, s.id)
|
|
||||||
assert_instance_of(Fixnum, s.profileIconId)
|
|
||||||
assert_instance_of(Fixnum, s.revisionDate)
|
|
||||||
assert_instance_of(Fixnum, s.level)
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_multiple_summoners_by_names
|
|
||||||
begin
|
|
||||||
s = @@sightstone.summoner.summoners([@@test_name, @@test_name2])
|
|
||||||
s.each do |name, summoner|
|
|
||||||
_check_summoner_validity(summoner)
|
|
||||||
assert_equal name.downcase, summoner.name.downcase
|
|
||||||
end
|
|
||||||
rescue Sightstone::RateLimitExceededException
|
|
||||||
puts "Rate limit exeeded, waiting 1 sec"
|
|
||||||
sleep 1
|
|
||||||
retry
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_summoner_by_name
|
|
||||||
begin
|
|
||||||
s = @@sightstone.summoner.summoner(@@test_name)
|
|
||||||
rescue Sightstone::RateLimitExceededException
|
|
||||||
puts "Rate limit exeeded, waiting 1 sec"
|
|
||||||
sleep 1
|
|
||||||
retry
|
|
||||||
end
|
|
||||||
_check_summoner_validity(s)
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_summoner_by_id
|
|
||||||
begin
|
|
||||||
s = @@sightstone.summoner.summoner(@@test_id_array[0])
|
|
||||||
rescue Sightstone::RateLimitExceededException
|
|
||||||
puts "Rate limit exeeded, waiting 1 sec"
|
|
||||||
sleep 1
|
|
||||||
retry
|
|
||||||
end
|
|
||||||
_check_summoner_validity(s)
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_summoner_names
|
|
||||||
begin
|
|
||||||
names = @@sightstone.summoner.names(@@test_id_array)
|
|
||||||
rescue Sightstone::RateLimitExceededException
|
|
||||||
puts "Rate limit exeeded, waiting 1 sec"
|
|
||||||
sleep 1
|
|
||||||
retry
|
|
||||||
end
|
|
||||||
assert_instance_of(Hash, names)
|
|
||||||
@@test_id_array.each do |id|
|
|
||||||
assert_equal(names.has_key?(id), true)
|
|
||||||
assert_instance_of(String, names[id])
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_summoner_runebook
|
|
||||||
begin
|
|
||||||
runebook = @@sightstone.summoner.runebook(@@test_id_array[0])
|
|
||||||
rescue Sightstone::RateLimitExceededException
|
|
||||||
puts "Rate limit exeeded, waiting 1 sec"
|
|
||||||
sleep 1
|
|
||||||
retry
|
|
||||||
end
|
|
||||||
assert_equal(@@test_id_array[0], runebook.summonerId)
|
|
||||||
assert_instance_of(Array, runebook.pages)
|
|
||||||
if runebook.pages.size > 0
|
|
||||||
# test a page
|
|
||||||
page = runebook.pages[0]
|
|
||||||
if(page.current == true || page.current == false)
|
|
||||||
assert_equal(true, true)
|
|
||||||
else
|
|
||||||
assert_equal(page.current, "asd")
|
|
||||||
end
|
|
||||||
assert_instance_of(Fixnum, page.id)
|
|
||||||
assert_instance_of(String, page.name)
|
|
||||||
assert_instance_of(Hash, page.slots)
|
|
||||||
|
|
||||||
if(page.slots.keys.size > 0)
|
|
||||||
# test rune
|
|
||||||
rune = page.slots[page.slots.keys[0]]
|
|
||||||
assert_instance_of(String, rune.description)
|
|
||||||
assert_instance_of(String, rune.name)
|
|
||||||
assert_instance_of(Fixnum, rune.tier)
|
|
||||||
assert_instance_of(Fixnum, rune.id)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_summoner_runebooks
|
|
||||||
begin
|
|
||||||
runebooks = @@sightstone.summoner.runebooks(@@test_id_array)
|
|
||||||
rescue Sightstone::RateLimitExceededException
|
|
||||||
puts "Rate limit exeeded, waiting 1 sec"
|
|
||||||
sleep 1
|
|
||||||
retry
|
|
||||||
end
|
|
||||||
runebooks.each do |key, runebook|
|
|
||||||
assert_equal(@@test_id_array[0], runebook.summonerId)
|
|
||||||
assert_instance_of(Array, runebook.pages)
|
|
||||||
if runebook.pages.size > 0
|
|
||||||
# test a page
|
|
||||||
page = runebook.pages[0]
|
|
||||||
if(page.current == true || page.current == false)
|
|
||||||
assert_equal(true, true)
|
|
||||||
else
|
|
||||||
assert_equal(page.current, "asd")
|
|
||||||
end
|
|
||||||
assert_instance_of(Fixnum, page.id)
|
|
||||||
assert_instance_of(String, page.name)
|
|
||||||
assert_instance_of(Hash, page.slots)
|
|
||||||
|
|
||||||
if(page.slots.keys.size > 0)
|
|
||||||
# test rune
|
|
||||||
rune = page.slots[page.slots.keys[0]]
|
|
||||||
assert_instance_of(String, rune.description)
|
|
||||||
assert_instance_of(String, rune.name)
|
|
||||||
assert_instance_of(Fixnum, rune.tier)
|
|
||||||
assert_instance_of(Fixnum, rune.id)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_summoner_masterybook
|
|
||||||
begin
|
|
||||||
masterybook = @@sightstone.summoner.masterybook(@@test_id_array[0])
|
|
||||||
rescue Sightstone::RateLimitExceededException
|
|
||||||
puts "Rate limit exeeded, waiting 1 sec"
|
|
||||||
sleep 1
|
|
||||||
retry
|
|
||||||
end
|
|
||||||
assert_equal(@@test_id_array[0], masterybook.summonerId)
|
|
||||||
assert_instance_of(Array, masterybook.pages)
|
|
||||||
if masterybook.pages.size > 0
|
|
||||||
# test a page
|
|
||||||
page = masterybook.pages[0]
|
|
||||||
if(page.current == true || page.current == false)
|
|
||||||
assert_equal(true, true)
|
|
||||||
else
|
|
||||||
assert_equal(page.current, "asd")
|
|
||||||
end
|
|
||||||
assert_instance_of(Fixnum, page.id)
|
|
||||||
assert_instance_of(String, page.name)
|
|
||||||
assert_instance_of(Array, page.talents)
|
|
||||||
|
|
||||||
if(page.talents.size > 0)
|
|
||||||
# test talent
|
|
||||||
talent = page.talents[0]
|
|
||||||
assert_instance_of(Fixnum, talent.rank)
|
|
||||||
assert_instance_of(String, talent.name)
|
|
||||||
assert_instance_of(Fixnum, talent.id)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_summoner_masterybooks
|
|
||||||
begin
|
|
||||||
masterybooks = @@sightstone.summoner.masterybooks(@@test_id_array)
|
|
||||||
rescue Sightstone::RateLimitExceededException
|
|
||||||
puts "Rate limit exeeded, waiting 1 sec"
|
|
||||||
sleep 1
|
|
||||||
retry
|
|
||||||
end
|
|
||||||
masterybooks.each do |id, masterybook|
|
|
||||||
assert_equal(@@test_id_array[0], masterybook.summonerId)
|
|
||||||
assert_instance_of(Array, masterybook.pages)
|
|
||||||
if masterybook.pages.size > 0
|
|
||||||
# test a page
|
|
||||||
page = masterybook.pages[0]
|
|
||||||
if(page.current == true || page.current == false)
|
|
||||||
assert_equal(true, true)
|
|
||||||
else
|
|
||||||
assert_equal(page.current, "asd")
|
|
||||||
end
|
|
||||||
assert_instance_of(Fixnum, page.id)
|
|
||||||
assert_instance_of(String, page.name)
|
|
||||||
assert_instance_of(Array, page.talents)
|
|
||||||
|
|
||||||
if(page.talents.size > 0)
|
|
||||||
# test talent
|
|
||||||
talent = page.talents[0]
|
|
||||||
assert_instance_of(Fixnum, talent.rank)
|
|
||||||
assert_instance_of(String, talent.name)
|
|
||||||
assert_instance_of(Fixnum, talent.id)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,80 +0,0 @@
|
|||||||
require 'test/unit'
|
|
||||||
require 'sightstone'
|
|
||||||
|
|
||||||
class TeamModuleTest < BaseTest
|
|
||||||
|
|
||||||
def test_teams
|
|
||||||
begin
|
|
||||||
teams = @@sightstone.team.teams @@req_id
|
|
||||||
rescue Sightstone::RateLimitExceededException
|
|
||||||
puts "Rate limit exeeded, waiting 1 sec"
|
|
||||||
sleep 1
|
|
||||||
retry
|
|
||||||
end
|
|
||||||
assert_instance_of(Array, teams)
|
|
||||||
teams.each do |team|
|
|
||||||
_check_team(team)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def _check_team(team)
|
|
||||||
assert_instance_of(Sightstone::Team, team)
|
|
||||||
assert_instance_of(String, team.status)
|
|
||||||
assert_instance_of(String, team.tag)
|
|
||||||
assert_instance_of(Sightstone::Roster, team.roster)
|
|
||||||
_check_roster(team.roster)
|
|
||||||
assert_instance_of(Fixnum, team.lastGameDate)
|
|
||||||
assert_instance_of(Fixnum, team.modifyDate)
|
|
||||||
assert_instance_of(String, team.teamId)
|
|
||||||
assert_instance_of(Fixnum, team.lastJoinDate)
|
|
||||||
assert_instance_of(Fixnum, team.secondLastJoinDate)
|
|
||||||
assert_instance_of(Array, team.matchHistory)
|
|
||||||
_check_history(team.matchHistory)
|
|
||||||
assert_instance_of(Fixnum, team.lastJoinedRankedTeamQueueDate)
|
|
||||||
assert_instance_of(String, team.name)
|
|
||||||
assert_instance_of(Fixnum, team.thirdLastJoinDate)
|
|
||||||
assert_instance_of(Fixnum, team.createDate)
|
|
||||||
assert_instance_of(Array, team.teamStatSummary)
|
|
||||||
_check_team_stats(team.teamStatSummary)
|
|
||||||
end
|
|
||||||
|
|
||||||
def _check_roster(roster)
|
|
||||||
assert_instance_of(Fixnum, roster.ownerId)
|
|
||||||
assert_instance_of(Array, roster.memberList)
|
|
||||||
roster.memberList.each do |member|
|
|
||||||
assert_instance_of(Sightstone::Member, member)
|
|
||||||
assert_instance_of(Fixnum, member.joinDate)
|
|
||||||
assert_instance_of(Fixnum, member.inviteDate)
|
|
||||||
assert_instance_of(Fixnum, member.playerId)
|
|
||||||
assert_instance_of(String, member.status)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def _check_history(history)
|
|
||||||
history.each do |game|
|
|
||||||
assert_instance_of(Sightstone::TeamHistoryGame, game)
|
|
||||||
assert_instance_of(String, game.gameMode)
|
|
||||||
assert_instance_of Fixnum, game.mapId
|
|
||||||
assert_instance_of Fixnum, game.assists
|
|
||||||
assert_instance_of String, game.opposingTeamName
|
|
||||||
assert (game.invalid || !game.invalid), "game.invalid should be a boolean"
|
|
||||||
assert_instance_of Fixnum, game.deaths
|
|
||||||
assert_instance_of Fixnum, game.gameId
|
|
||||||
assert_instance_of Fixnum, game.kills
|
|
||||||
assert (game.win || !game.win), "game.win should be a boolean"
|
|
||||||
assert_instance_of Fixnum, game.opposingTeamKills
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def _check_team_stats(stats)
|
|
||||||
stats.each do |stat|
|
|
||||||
assert_instance_of(Sightstone::TeamStat, stat)
|
|
||||||
assert_instance_of(Fixnum, stat.wins)
|
|
||||||
assert_instance_of(Fixnum, stat.losses)
|
|
||||||
assert_instance_of(Fixnum, stat.averageGamesPlayed)
|
|
||||||
assert_instance_of(String, stat.fullId)
|
|
||||||
assert_instance_of(String, stat.teamStatType)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
Reference in New Issue
Block a user