diff --git a/pkg/extractor/v9/extractor_test.go b/pkg/extractor/v9/extractor_test.go index 70dff653..0ecb1295 100644 --- a/pkg/extractor/v9/extractor_test.go +++ b/pkg/extractor/v9/extractor_test.go @@ -119,7 +119,7 @@ func TestGetConstructions(t *testing.T) { } func TestExtractResourceSettings(t *testing.T) { - pageHTMLBytes, _ := ioutil.ReadFile("../../../samples/v9.0.4/resource_settings.html") + pageHTMLBytes, _ := ioutil.ReadFile("../../../samples/v9.0.4/en/resource_settings.html") settings, _, _ := NewExtractor().ExtractResourceSettings(pageHTMLBytes) - assert.Equal(t, ogame.ResourceSettings{MetalMine: 100, CrystalMine: 100, DeuteriumSynthesizer: 0, SolarPlant: 100, FusionReactor: 0, SolarSatellite: 0, Crawler: 0, PlasmaTechnology: 0}, settings) + assert.Equal(t, ogame.ResourceSettings{MetalMine: 100, CrystalMine: 100, DeuteriumSynthesizer: 100, SolarPlant: 100, FusionReactor: 100, SolarSatellite: 100, Crawler: 100, PlasmaTechnology: 100}, settings) } diff --git a/pkg/ogame/resourceSettings.go b/pkg/ogame/resourceSettings.go index 237357dc..37e7941d 100644 --- a/pkg/ogame/resourceSettings.go +++ b/pkg/ogame/resourceSettings.go @@ -23,5 +23,5 @@ func (r ResourceSettings) String() string { " Fusion Reactor: " + utils.FI64(r.FusionReactor) + "\n" + " Solar Satellite: " + utils.FI64(r.SolarSatellite) + "\n" + " Crawler: " + utils.FI64(r.Crawler) + "\n" + - " PlasmaTechnology: " + utils.FI64(r.PlasmaTechnology) + " Plasma Technology: " + utils.FI64(r.PlasmaTechnology) } diff --git a/pkg/ogame/resourceSettings_test.go b/pkg/ogame/resourceSettings_test.go index 1bbe24d8..3beae2ad 100644 --- a/pkg/ogame/resourceSettings_test.go +++ b/pkg/ogame/resourceSettings_test.go @@ -15,6 +15,7 @@ func TestResourceSettings_String(t *testing.T) { FusionReactor: 5, SolarSatellite: 6, Crawler: 7, + PlasmaTechnology: 8, } expected := "\n" + " Metal Mine: 1\n" + @@ -23,6 +24,7 @@ func TestResourceSettings_String(t *testing.T) { " Solar Plant: 4\n" + " Fusion Reactor: 5\n" + " Solar Satellite: 6\n" + - " Crawler: 7" + " Crawler: 7\n" + + " Plasma Technology: 8" assert.Equal(t, expected, r.String()) } diff --git a/samples/v9.0.4/en/resource_settings.html b/samples/v9.0.4/en/resource_settings.html new file mode 100644 index 00000000..15a9776d --- /dev/null +++ b/samples/v9.0.4/en/resource_settings.html @@ -0,0 +1,2042 @@ + + + +
++ 3/3 Planets +
+