forked from alaingilbert/ogame
-
Notifications
You must be signed in to change notification settings - Fork 0
/
id_test.go
85 lines (80 loc) · 4.18 KB
/
id_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
package ogame
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestID_IsSet(t *testing.T) {
assert.True(t, AllianceDepotID.IsSet())
assert.False(t, ID(0).IsSet())
}
func TestID_Int(t *testing.T) {
assert.Equal(t, int64(34), AllianceDepotID.Int64())
}
func TestID_String(t *testing.T) {
assert.Equal(t, "Invalid(123456)", ID(123456).String())
assert.Equal(t, "AllianceDepot", AllianceDepotID.String())
assert.Equal(t, "RoboticsFactory", RoboticsFactoryID.String())
assert.Equal(t, "Shipyard", ShipyardID.String())
assert.Equal(t, "ResearchLab", ResearchLabID.String())
assert.Equal(t, "MissileSilo", MissileSiloID.String())
assert.Equal(t, "NaniteFactory", NaniteFactoryID.String())
assert.Equal(t, "Terraformer", TerraformerID.String())
assert.Equal(t, "SpaceDock", SpaceDockID.String())
assert.Equal(t, "LunarBase", LunarBaseID.String())
assert.Equal(t, "SensorPhalanx", SensorPhalanxID.String())
assert.Equal(t, "JumpGate", JumpGateID.String())
assert.Equal(t, "MetalMine", MetalMineID.String())
assert.Equal(t, "CrystalMine", CrystalMineID.String())
assert.Equal(t, "DeuteriumSynthesizer", DeuteriumSynthesizerID.String())
assert.Equal(t, "SolarPlant", SolarPlantID.String())
assert.Equal(t, "FusionReactor", FusionReactorID.String())
assert.Equal(t, "MetalStorage", MetalStorageID.String())
assert.Equal(t, "CrystalStorage", CrystalStorageID.String())
assert.Equal(t, "DeuteriumTank", DeuteriumTankID.String())
assert.Equal(t, "ShieldedMetalDen", ShieldedMetalDenID.String())
assert.Equal(t, "UndergroundCrystalDen", UndergroundCrystalDenID.String())
assert.Equal(t, "SeabedDeuteriumDen", SeabedDeuteriumDenID.String())
assert.Equal(t, "RocketLauncher", RocketLauncherID.String())
assert.Equal(t, "LightLaser", LightLaserID.String())
assert.Equal(t, "HeavyLaser", HeavyLaserID.String())
assert.Equal(t, "GaussCannon", GaussCannonID.String())
assert.Equal(t, "IonCannon", IonCannonID.String())
assert.Equal(t, "PlasmaTurret", PlasmaTurretID.String())
assert.Equal(t, "SmallShieldDome", SmallShieldDomeID.String())
assert.Equal(t, "LargeShieldDome", LargeShieldDomeID.String())
assert.Equal(t, "AntiBallisticMissiles", AntiBallisticMissilesID.String())
assert.Equal(t, "InterplanetaryMissiles", InterplanetaryMissilesID.String())
assert.Equal(t, "SmallCargo", SmallCargoID.String())
assert.Equal(t, "LargeCargo", LargeCargoID.String())
assert.Equal(t, "LightFighter", LightFighterID.String())
assert.Equal(t, "HeavyFighter", HeavyFighterID.String())
assert.Equal(t, "Cruiser", CruiserID.String())
assert.Equal(t, "Battleship", BattleshipID.String())
assert.Equal(t, "ColonyShip", ColonyShipID.String())
assert.Equal(t, "Recycler", RecyclerID.String())
assert.Equal(t, "EspionageProbe", EspionageProbeID.String())
assert.Equal(t, "Bomber", BomberID.String())
assert.Equal(t, "SolarSatellite", SolarSatelliteID.String())
assert.Equal(t, "Destroyer", DestroyerID.String())
assert.Equal(t, "Deathstar", DeathstarID.String())
assert.Equal(t, "Battlecruiser", BattlecruiserID.String())
assert.Equal(t, "Crawler", CrawlerID.String())
assert.Equal(t, "Reaper", ReaperID.String())
assert.Equal(t, "Pathfinder", PathfinderID.String())
assert.Equal(t, "EspionageTechnology", EspionageTechnologyID.String())
assert.Equal(t, "ComputerTechnology", ComputerTechnologyID.String())
assert.Equal(t, "WeaponsTechnology", WeaponsTechnologyID.String())
assert.Equal(t, "ShieldingTechnology", ShieldingTechnologyID.String())
assert.Equal(t, "ArmourTechnology", ArmourTechnologyID.String())
assert.Equal(t, "EnergyTechnology", EnergyTechnologyID.String())
assert.Equal(t, "HyperspaceTechnology", HyperspaceTechnologyID.String())
assert.Equal(t, "CombustionDrive", CombustionDriveID.String())
assert.Equal(t, "ImpulseDrive", ImpulseDriveID.String())
assert.Equal(t, "HyperspaceDrive", HyperspaceDriveID.String())
assert.Equal(t, "LaserTechnology", LaserTechnologyID.String())
assert.Equal(t, "IonTechnology", IonTechnologyID.String())
assert.Equal(t, "PlasmaTechnology", PlasmaTechnologyID.String())
assert.Equal(t, "IntergalacticResearchNetwork", IntergalacticResearchNetworkID.String())
assert.Equal(t, "Astrophysics", AstrophysicsID.String())
assert.Equal(t, "GravitonTechnology", GravitonTechnologyID.String())
}