mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-21 13:55:58 +00:00
Add opt-in GOG achievements through Comet (#651)
This commit is contained in:
1 parent
3ed756b067
commit
8f36eb7f54
35 files changed
+1364
-45
No files matched your search
@@ -0,0 +1,29 @@
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertNull
|
||||
import org.junit.Test
|
||||
|
||||
class SessionAchievementGameTest {
|
||||
private val installed = setOf(10L, 20L)
|
||||
|
||||
@Test fun exitingGameCannotRemainSelectedWithoutItsWindow() {
|
||||
assertNull(SessionAchievementGame.activeAppId(10, listOf(769), installed))
|
||||
}
|
||||
|
||||
@Test fun steamOverlayKeepsTheRunningGameSelected() {
|
||||
assertEquals(10L, SessionAchievementGame.activeAppId(769, listOf(769, 10), installed))
|
||||
}
|
||||
|
||||
@Test fun anotherForegroundAppCannotBorrowABackgroundGamesAchievements() {
|
||||
assertNull(SessionAchievementGame.activeAppId(30, listOf(30, 10), installed))
|
||||
}
|
||||
|
||||
@Test fun ambiguousBackgroundGamesDoNotPickAnArbitraryGame() {
|
||||
assertNull(SessionAchievementGame.activeAppId(769, listOf(769, 10, 20), installed))
|
||||
}
|
||||
|
||||
@Test fun theForegroundGameWinsWhenSeveralGamesAreRunning() {
|
||||
assertEquals(20L, SessionAchievementGame.activeAppId(20, listOf(769, 10, 20), installed))
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user