Differential D1240 Diff 6083 binaries/data/mods/public/simulation/components/tests/test_EndGameManager.js
Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/tests/test_EndGameManager.js
Show All 17 Lines | |||||
AddMock(playerEnt1, IID_Player, { | AddMock(playerEnt1, IID_Player, { | ||||
"GetName": () => "Player 1", | "GetName": () => "Player 1", | ||||
"GetState": () => "active", | "GetState": () => "active", | ||||
}); | }); | ||||
TS_ASSERT_EQUALS(cmpEndGameManager.skipAlliedVictoryCheck, true); | TS_ASSERT_EQUALS(cmpEndGameManager.skipAlliedVictoryCheck, true); | ||||
cmpEndGameManager.SetAlliedVictory(true); | cmpEndGameManager.SetAlliedVictory(true); | ||||
TS_ASSERT_EQUALS(cmpEndGameManager.GetAlliedVictory(), true); | TS_ASSERT_EQUALS(cmpEndGameManager.GetAlliedVictory(), true); | ||||
cmpEndGameManager.SetGameType("wonder", { "wonderDuration": wonderDuration }); | cmpEndGameManager.SetGameSettings({ | ||||
"victoryConditions": ["wonder"], | |||||
"wonderDuration": wonderDuration | |||||
}); | |||||
elexis: (I like objects with each property on a single line) | |||||
Not Done Inline Actionsthx (isn't it nicer?) elexis: thx (isn't it nicer?) | |||||
TS_ASSERT_EQUALS(cmpEndGameManager.skipAlliedVictoryCheck, false); | TS_ASSERT_EQUALS(cmpEndGameManager.skipAlliedVictoryCheck, false); | ||||
TS_ASSERT(cmpEndGameManager.GetGameType() == "wonder"); | TS_ASSERT_UNEVAL_EQUALS(cmpEndGameManager.GetVictoryConditions(), ["wonder"]); | ||||
TS_ASSERT_EQUALS(cmpEndGameManager.GetGameTypeSettings().wonderDuration, wonderDuration); | TS_ASSERT_EQUALS(cmpEndGameManager.GetGameSettings().wonderDuration, wonderDuration); | ||||
elexisUnsubmitted Not Done Inline Actions(Someone could extend the test sometime, maybe, or not) elexis: (Someone could extend the test sometime, maybe, or not) |
Wildfire Games · Phabricator
(I like objects with each property on a single line)