Differential D2409 Diff 10281 binaries/data/mods/public/simulation/components/tests/test_EntityLimits.js
Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/tests/test_EntityLimits.js
Show All 19 Lines | "LimitRemovers": { | ||||
"Hero": { "RequiredClasses": { "_string": "Aegis" } } | "Hero": { "RequiredClasses": { "_string": "Aegis" } } | ||||
} | } | ||||
}; | }; | ||||
AddMock(10, IID_Player, { | AddMock(10, IID_Player, { | ||||
"GetPlayerID": id => 1 | "GetPlayerID": id => 1 | ||||
}); | }); | ||||
AddMock(SYSTEM_ENTITY, IID_GuiInterface, { | AddMock(SYSTEM_ENTITY, IID_GuiInterface, { | ||||
"PushNotification": () => {} | "PushTimeNotification": () => {} | ||||
}); | }); | ||||
let cmpEntityLimits = ConstructComponent(10, "EntityLimits", template); | let cmpEntityLimits = ConstructComponent(10, "EntityLimits", template); | ||||
// Test getters | // Test getters | ||||
TS_ASSERT_UNEVAL_EQUALS(cmpEntityLimits.GetCounts(), { "Tower": 0, "Wonder": 0, "Hero": 0, "Champion": 0 }); | TS_ASSERT_UNEVAL_EQUALS(cmpEntityLimits.GetCounts(), { "Tower": 0, "Wonder": 0, "Hero": 0, "Champion": 0 }); | ||||
TS_ASSERT_UNEVAL_EQUALS(cmpEntityLimits.GetLimits(), { "Tower": 5, "Wonder": 1, "Hero": 2, "Champion": 1 }); | TS_ASSERT_UNEVAL_EQUALS(cmpEntityLimits.GetLimits(), { "Tower": 5, "Wonder": 1, "Hero": 2, "Champion": 1 }); | ||||
TS_ASSERT_UNEVAL_EQUALS(cmpEntityLimits.GetLimitChangers(), { "Tower": { "Monument": 1 } }); | TS_ASSERT_UNEVAL_EQUALS(cmpEntityLimits.GetLimitChangers(), { "Tower": { "Monument": 1 } }); | ||||
▲ Show 20 Lines • Show All 167 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator