mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-18 20:36:04 +00:00
fix: check a Battle.net game for updates again when the last check failed
This commit is contained in:
1 parent
24f0b97c08
commit
db56cff880
2 files changed
+19
-4
No files matched your search
@@ -8,6 +8,7 @@ import org.junit.Assert.assertFalse
|
||||
import org.junit.Assert.assertNull
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Test
|
||||
import java.nio.file.Files
|
||||
import java.util.Locale
|
||||
|
||||
class BattleNetInstallTest {
|
||||
@@ -64,6 +65,17 @@ class BattleNetInstallTest {
|
||||
assertFalse(BattleNetInstall.headless(CatalogItem(Store.EPIC, "gryphon", "Warcraft Rumble", null)))
|
||||
}
|
||||
|
||||
@Test fun aCheckThatCouldNotRunIsTriedAgainNextTime() {
|
||||
val folder = Files.createTempDirectory("bnet").toFile()
|
||||
try {
|
||||
BattleNetInstall.check("gryphon", folder, false)
|
||||
BattleNetInstall.checks.submit {}.get()
|
||||
assertFalse(synchronized(BattleNetInstall.checkedAt) { "gryphon" in BattleNetInstall.checkedAt })
|
||||
} finally {
|
||||
folder.deleteRecursively()
|
||||
}
|
||||
}
|
||||
|
||||
@Test fun theAgentStatusPicksTheDownloadStep() {
|
||||
assertEquals(BattleNetInstall.Step.PREPARING, BattleNetInstall.step(1008, 0, 0, 0))
|
||||
assertEquals(BattleNetInstall.Step.PREPARING, BattleNetInstall.step(1003, 500, 0, 0))
|
||||
|
||||
Reference in new issue
Block a user