mirror of
https://github.com/yairm210/Unciv.git
synced 2024-12-22 20:04:24 +07:00
Fix tests
This commit is contained in:
parent
0c5e82487e
commit
f764f7c467
@ -29,7 +29,7 @@ import com.badlogic.gdx.backends.android.DefaultAndroidFiles
|
||||
import com.unciv.logic.GameInfo
|
||||
import com.unciv.logic.files.UncivFiles
|
||||
import com.unciv.logic.multiplayer.storage.FileStorageRateLimitReached
|
||||
import com.unciv.logic.multiplayer.storage.OnlineMultiplayerServer
|
||||
import com.unciv.logic.multiplayer.storage.MultiplayerServer
|
||||
import com.unciv.models.metadata.GameSettings.GameSettingsMultiplayer
|
||||
import java.io.FileNotFoundException
|
||||
import java.io.PrintWriter
|
||||
@ -310,7 +310,7 @@ class MultiplayerTurnCheckWorker(appContext: Context, workerParams: WorkerParame
|
||||
|
||||
try {
|
||||
Log.d(LOG_TAG, "doWork download $gameId")
|
||||
val gamePreview = OnlineMultiplayerServer(fileStorage, mapOf("Authorization" to authHeader)).tryDownloadGamePreview(gameId)
|
||||
val gamePreview = MultiplayerServer(fileStorage, mapOf("Authorization" to authHeader)).tryDownloadGamePreview(gameId)
|
||||
Log.d(LOG_TAG, "doWork download $gameId done")
|
||||
val currentTurnPlayer = gamePreview.getCivilization(gamePreview.currentPlayer)
|
||||
|
||||
|
@ -120,7 +120,7 @@ class GoldGiftingTests {
|
||||
tradeOffer.acceptTrade()
|
||||
bDiplomacy.nextTurn()
|
||||
val tradeOffer2 = TradeLogic(a,b)
|
||||
tradeOffer2.currentTrade.theirOffers.add(TradeOffer("Gold", TradeOfferType.Gold, 900))
|
||||
tradeOffer2.currentTrade.theirOffers.add(TradeOffer("Gold", TradeOfferType.Gold, 900, testGame.gameInfo.speed))
|
||||
assertTrue(TradeEvaluation().getTradeAcceptability(tradeOffer.currentTrade.reverse(), b,a,false) > 0)
|
||||
tradeOffer2.acceptTrade()
|
||||
assertTrue(bDiplomacy.getGoldGifts() >= 0) // Must not be negative
|
||||
|
Loading…
Reference in New Issue
Block a user