Fix tests

This commit is contained in:
yairm210 2024-08-08 14:16:34 +03:00
parent 0c5e82487e
commit f764f7c467
2 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -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