Skip to content

Commit

Permalink
add test for extract all resources tw 9.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
alaingilbert committed Aug 5, 2022
1 parent 5344919 commit 1ea270e
Show file tree
Hide file tree
Showing 2 changed files with 669 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ogame_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3259,6 +3259,13 @@ func TestExtractAllResources(t *testing.T) {
assert.Equal(t, Resources{Metal: 0, Crystal: 0, Deuterium: 2676231}, resources[33741598])
}

func TestExtractAllResourcesTwV902(t *testing.T) {
pageHTMLBytes, _ := ioutil.ReadFile("samples/v9.0.2/tw/traderauctioneer.html")
resources, _ := NewExtractorV71().ExtractAllResources(pageHTMLBytes)
assert.Equal(t, 1, len(resources))
assert.Equal(t, Resources{Metal: 1005, Crystal: 1002, Deuterium: 0}, resources[33620229])
}

func TestExtractDMCosts(t *testing.T) {
pageHTMLBytes, _ := ioutil.ReadFile("samples/v7.1/en/overview_allDM.html")
dmCosts, _ := NewExtractorV71().ExtractDMCosts(pageHTMLBytes)
Expand Down
Loading

0 comments on commit 1ea270e

Please sign in to comment.