Skip to content

tests: Added unit tests for new key parts of Gamenative#1143

Open
unbelievableflavour wants to merge 4 commits intoutkarshdalal:masterfrom
unbelievableflavour:more-unit-tests
Open

tests: Added unit tests for new key parts of Gamenative#1143
unbelievableflavour wants to merge 4 commits intoutkarshdalal:masterfrom
unbelievableflavour:more-unit-tests

Conversation

@unbelievableflavour
Copy link
Copy Markdown
Contributor

@unbelievableflavour unbelievableflavour commented Apr 8, 2026

Description

Since I introduced a couple new key components in gamenative I thought it be good to include tests for those. New types for these should require to have tests at well so that at least these new sections are always reliable.

Tests for:

  • Launch dependencies and its launch dep types.
  • game fix registry and it's fix types.
  • Preinstall steps and its specific preinstallstep types.

I've made the launchdeps, game fix registry, and preinstallsteps tests itself test independent of their children so they dont have to be updated on every new child types. (hence the small mock functions added to those so their lists can be mutated)

Recording

https://discord.com/channels/1378308569287622737/1491337710244331720

Checklist

  • If I have access to #code-changes, I have discussed this change there and it has been green-lighted. If I do not have access, I have still provided clear context in this PR. If I skip both, I accept that this change may face delays in review, may not be reviewed at all, or may be closed.
  • I have attached a recording of the change.
  • I have read and agree to the contribution guidelines in CONTRIBUTING.md.

Summary by CodeRabbit

  • Tests
    • Large new suite of unit and integration tests covering game fixes, dependency handling, launch-arg and registry behavior, pre-install steps, and orchestration across many edge cases.
  • Chores
    • Added internal test-only hooks to allow injecting providers for fixes, dependencies, and pre-install steps to improve testability.
    • Minor cleanup: removed an unused import.

@unbelievableflavour unbelievableflavour changed the title More unit tests More viable unit tests for new key parts of our application Apr 8, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 8, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Replaced direct static-collection access with injectable provider functions in three production modules and added internal test-only setters to override them; added multiple Robolectric/MockK tests covering game fixes, launch-dependencies, and pre-install steps (markers, command building, downloads, and registry edits).

Changes

Cohort / File(s) Summary
Provider injection (core)
app/src/main/java/app/gamenative/gamefixes/GameFixesRegistry.kt, app/src/main/java/app/gamenative/utils/LaunchDependencies.kt, app/src/main/java/app/gamenative/utils/PreInstallSteps.kt
Introduced mutable provider functions (fixesProvider, dependenciesProvider, stepsProvider) used by runtime APIs and added internal test-only setters (setFixesProviderForTests, setDependenciesProviderForTests, setStepsProviderForTests) to override or restore defaults.
Game fixes tests
app/src/test/java/app/gamenative/gamefixes/...
GameFixesRegistryTest.kt, KeyedGameFixTypesTest.kt, GOGDependencyFixTest.kt, LaunchArgFixTest.kt, RegistryKeyFixTest.kt
Added unit/integration tests for GameFixesRegistry lookup/injection, keyed-fix metadata, GOG dependency download behavior, launch-arg application, and registry-key modifications (uses temp FS and mocked services).
Launch-dependency tests
app/src/test/java/app/gamenative/utils/...
LaunchDependenciesTest.kt, launchdependencies/GogScriptInterpreterDependencyTest.kt
Added tests validating provider-based dependency selection, ensure/install flows, loading UI progress updates, and GOG script-interpreter download coordination (progress callbacks and error paths).
Pre-install steps tests
app/src/test/java/app/gamenative/utils/preInstallSteps/...
PreInstallStepsTest.kt, GogScriptInterpreterStepTest.kt, OpenALStepTest.kt, PhysXStepTest.kt, UbisoftConnectStepTest.kt, VcRedistStepTest.kt, XnaFrameworkStepTest.kt
Added E2E and unit tests for pre-install orchestration and individual steps: marker handling, installer detection, command construction/wrapping, marker creation/reset, container-variant behavior, and injected steps provider usage.

Sequence Diagram(s)

(omitted)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • PR #608 — Modifies GameFixesRegistry lookup mechanics; directly related to the provider-injectable registry changes in this PR.
  • PR #600 — Introduced the original GameFixesRegistry/fixes map; this PR layers a mutable provider/test hook on that implementation.
  • PR #930 — Overlaps GameFixesRegistry.apply and GameFix application flow; tests added here depend on those runtime behaviors.

Poem

🐰 I nibble code lines, hop by hop,

Providers tucked in so tests can swap.
Markers sprout where installers dwell,
Downloads hum, progress rings the bell.
A rabbit cheers — the tests all hop!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 4.65% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The description provides clear context, lists tested components, and explains the design approach for test independence. All checklist items are marked complete.
Title check ✅ Passed The title 'tests: Added unit tests for new key parts of Gamenative' directly and clearly summarizes the main change—adding unit tests for key components—which aligns with the changeset contents.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 17 files

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (7)
app/src/test/java/app/gamenative/utils/preInstallSteps/VcRedistStepTest.kt (1)

47-47: Remove redundant container.drives stubbing in this test.

VcRedistStep.buildCommand(...) is file-based via gameDir, so this stub adds noise without affecting behavior.

♻️ Proposed cleanup
-        every { container.drives } returns "A:${gameDir.absolutePath}"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/src/test/java/app/gamenative/utils/preInstallSteps/VcRedistStepTest.kt`
at line 47, Remove the redundant stubbing of container.drives in the
VcRedistStepTest: delete the line that does every { container.drives } returns
"A:${gameDir.absolutePath}" since VcRedistStep.buildCommand(...) derives
behavior from the gameDir file path and this stub is unnecessary noise; keep
other mocks intact and run the test to confirm no behavior change.
app/src/test/java/app/gamenative/utils/launchdependencies/GogScriptInterpreterDependencyTest.kt (2)

65-72: Temporary directories are not cleaned up after tests.

The test creates multiple temporary directories via createTempDirectory() (lines 65, 76, 89, 136) but never deletes them. While the JVM may eventually clean these up, it's better practice to explicitly delete them in @After or use JUnit's @TempDir rule.

♻️ Suggested improvement using `@TempDir`
+import org.junit.Rule
+import org.junit.rules.TemporaryFolder

 `@RunWith`(RobolectricTestRunner::class)
 class GogScriptInterpreterDependencyTest {
     private lateinit var context: Context
     private lateinit var container: Container
+
+    `@get`:Rule
+    val tempFolder = TemporaryFolder()

Then replace createTempDirectory(prefix = "...").toFile() calls with tempFolder.newFolder("...").

Also applies to: 76-85, 89-132, 136-150

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@app/src/test/java/app/gamenative/utils/launchdependencies/GogScriptInterpreterDependencyTest.kt`
around lines 65 - 72, The tests in GogScriptInterpreterDependencyTest create
temporary directories via createTempDirectory() (variables like installDir) and
never clean them up; replace those manual temp directories by using JUnit's
`@TempDir` (declare a TempDir field) and use that temp directory for the test
folders (or alternatively delete the created directories in an `@After` method),
updating the test cases that call createTempDirectory() (the instances around
the installDir and other temp folder creations) to use the shared
`@TempDir-managed` directory so cleanup is handled automatically.

147-149: Consider a more meaningful assertion for graceful exit.

assertTrue(true) is a no-op assertion that provides no verification. While the comment explains the intent (reaching this point means graceful exit), the test would pass even if an exception were thrown and caught elsewhere.

Consider verifying that no unexpected interactions occurred:

♻️ Alternative assertion
-        // Reaching this point means it exited gracefully.
-        assertTrue(true)
+        // Verify install did not attempt any download when service is unavailable
+        coVerify(exactly = 0) { any<GOGDownloadManager>().downloadDependenciesWithProgress(any(), any(), any(), any(), any()) }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@app/src/test/java/app/gamenative/utils/launchdependencies/GogScriptInterpreterDependencyTest.kt`
around lines 147 - 149, The final no-op assertion in
GogScriptInterpreterDependencyTest (assertTrue(true)) should be replaced with a
meaningful check that the interpreter exited gracefully: wrap the invocation
under test in an assertion like assertDoesNotThrow { /* call the method that
runs the interpreter */ } and/or assert expected mock interactions (e.g.,
verifyNoMoreInteractions(mockInstaller) or verify(mockLogger).info(...)) to
confirm no unexpected behavior; update the test in class
GogScriptInterpreterDependencyTest to call assertDoesNotThrow around the
interpreter run and add verifyNoMoreInteractions/verify calls for the relevant
mocks used in the test.
app/src/test/java/app/gamenative/utils/PreInstallStepsTest.kt (1)

39-50: Temporary directory is not cleaned up after tests.

Similar to GogScriptInterpreterDependencyTest, the gameDir temp directory created in setUp() is never deleted. Consider using JUnit's TemporaryFolder rule for automatic cleanup.

♻️ Suggested improvement
+import org.junit.Rule
+import org.junit.rules.TemporaryFolder

 `@RunWith`(RobolectricTestRunner::class)
 class PreInstallStepsTest {
     private lateinit var container: Container
-    private lateinit var gameDir: File
+
+    `@get`:Rule
+    val tempFolder = TemporaryFolder()
+
+    private val gameDir: File
+        get() = tempFolder.root

     `@Before`
     fun setUp() {
         container = mockk(relaxed = true)
-        gameDir = createTempDirectory(prefix = "preinstall-steps-test").toFile()
         every { container.drives } returns "A:${gameDir.absolutePath}"
         every { container.containerVariant } returns Container.BIONIC
     }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/src/test/java/app/gamenative/utils/PreInstallStepsTest.kt` around lines
39 - 50, The test creates a temp directory via createTempDirectory() assigned to
gameDir in setUp() but never deletes it; update tearDown() to remove the temp
directory (gameDir) after tests (or replace createTempDirectory usage with JUnit
TemporaryFolder/TempDir rule) so the filesystem is cleaned; modify the existing
tearDown() (which currently calls
PreInstallSteps.setStepsProviderForTests(null)) to also delete gameDir (or
switch setUp/tearDown to use the TemporaryFolder/TempDir mechanism) and ensure
any mocking of container.drives still points to the cleaned/managed directory.
app/src/test/java/app/gamenative/utils/LaunchDependenciesTest.kt (1)

138-171: Consider verifying the exception was actually thrown.

The test catches IllegalStateException but doesn't assert that the exception was thrown. If the production code silently swallows the exception, this test would still pass.

♻️ Suggested improvement
+        var exceptionThrown = false
         try {
             sut.ensureLaunchDependencies(
                 context = context,
                 container = container,
                 gameSource = GameSource.GOG,
                 gameId = 9,
                 setLoadingMessage = { messages += it },
                 setLoadingProgress = { progress += it },
             )
         } catch (_: IllegalStateException) {
-            // Expected in this test.
+            exceptionThrown = true
         }
 
+        assertTrue("Expected IllegalStateException to be thrown", exceptionThrown)
         assertEquals(context.getString(R.string.main_loading), messages.last())
         assertEquals(1f, progress.last())
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/src/test/java/app/gamenative/utils/LaunchDependenciesTest.kt` around
lines 138 - 171, The test
ensureLaunchDependencies_resetsLoadingUi_evenIfInstallFails currently catches
IllegalStateException without asserting it was thrown; change the test to
explicitly assert the exception from sut.ensureLaunchDependencies (for example
using assertFailsWith<IllegalStateException> or capturing a Boolean/flag) while
keeping the existing checks on messages.last() and progress.last(), and
reference the failing call to GogScriptInterpreterDependency.install invoked via
sut.ensureLaunchDependencies to ensure the install exception is actually
propagated.
app/src/test/java/app/gamenative/gamefixes/LaunchArgFixTest.kt (1)

43-53: Add whitespace-only execArgs coverage.

LaunchArgFix.apply(...) uses trim(). A " " input should be treated as empty and apply the fix, but that path is not currently tested.

Suggested additional test
+    `@Test`
+    fun apply_setsLaunchArgs_whenContainerArgsAreWhitespaceOnly() {
+        val fix = LaunchArgFix("-lang=eng")
+        every { container.execArgs } returns "   "
+        every { container.execArgs = any() } just runs
+        every { container.saveData() } just runs
+
+        val result = fix.apply(context, "1129934535", "/tmp/game", "A:\\", container)
+
+        assertTrue(result)
+        verify(exactly = 1) { container.execArgs = "-lang=eng" }
+        verify(exactly = 1) { container.saveData() }
+    }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/src/test/java/app/gamenative/gamefixes/LaunchArgFixTest.kt` around lines
43 - 53, Add a new unit test in LaunchArgFixTest that covers whitespace-only
execArgs by creating a test (e.g.,
apply_applies_whenContainerExecArgsIsWhitespace) that constructs
LaunchArgFix("-lang=eng"), mocks container.execArgs to return a string of only
spaces (e.g., "   "), calls fix.apply(context, "1129934535", "/tmp/game",
"A:\\", container), asserts the result is true, and verifies that
container.execArgs is assigned (and container.saveData() is invoked) — this
verifies LaunchArgFix.apply treats trim()-only whitespace as empty and applies
the fix.
app/src/main/java/app/gamenative/gamefixes/GameFixesRegistry.kt (1)

41-41: Thread-safety approach should match practical risk profile. While fixesProvider is technically mutable shared state without synchronization, it's a test-only hook with controlled access timing (explicit @Before/@After reset) and runs single-threaded (RobolectricTestRunner). An AtomicReference wrapper may be unnecessary over-engineering. If this remains a concern, consider making the provider immutable at construction time or gating test overrides with a test-time-only guard instead.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/src/main/java/app/gamenative/gamefixes/GameFixesRegistry.kt` at line 41,
The mutable shared var fixesProvider currently allows test-only overrides
without synchronization (symbol: fixesProvider) which the reviewer flagged as
overkill for thread-safety; either make the provider immutable by initializing
fixesProvider at construction time from the existing fixes map (use the
constructor to set fixesProvider = { fixes }) or add a test-only guard that only
permits overrides under a DEBUG/TEST flag (expose a setOverridesForTests(...)
helper) so production usage cannot mutate fixesProvider at runtime; update
usages that reset it in tests to call the new test-only helper or rely on the
immutable provider (refer to fixesProvider and fixes to locate changes).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@app/src/test/java/app/gamenative/gamefixes/GameFixesRegistryTest.kt`:
- Around line 35-39: The tearDown() currently calls unmockkAll(), which clears
global mock state; instead only unmock the specific global mock
GOGService.Companion. Replace the unmockkAll() call in the tearDown() method
with unmockkObject(GOGService.Companion) and keep the existing
GameFixesRegistry.setFixesProviderForTests(null) call so only the required
global mock is cleaned up.

In `@app/src/test/java/app/gamenative/gamefixes/GOGDependencyFixTest.kt`:
- Around line 38-41: Replace the broad unmockkAll() call in tearDown() with
targeted unmockkObject(GOGService.Companion) to only undo the mocked companion
object; locate the tearDown() method in GOGDependencyFixTest and change the
cleanup to call unmockkObject on GOGService.Companion so other mocks in the test
suite aren’t impacted during parallel runs.

In `@app/src/test/java/app/gamenative/gamefixes/RegistryKeyFixTest.kt`:
- Around line 29-35: Tests like apply_returnsFalse_whenSystemRegDoesNotExist
mutate the shared Wine prefix file (system.reg) causing cross-test
contamination; modify the tests to isolate changes by creating a temporary
wineprefix or backing up and restoring the registry file: for the test that uses
ImageFs.find(context) and the local systemRegFile variable, either point ImageFs
to a temp directory (so system.reg is created/removed in a per-test temp prefix)
or copy the existing system.reg to a backup before deleting/modifying and
restore it in a teardown/@After block (or finally) to ensure original content is
always restored; apply the same pattern to the other tests referenced (lines
~49-55 and ~75-83) that manipulate system.reg.

In
`@app/src/test/java/app/gamenative/utils/preInstallSteps/GogScriptInterpreterStepTest.kt`:
- Around line 41-49: The test method
appliesTo_requiresGogAndGlibcAndMissingMarker should also verify the "marker
present" branch: after asserting appliesTo is true for Container.GLIBC and
GameSource.GOG, create or mock the presence of Marker.GOG_SCRIPT_INSTALLED in
the gameDir (so the marker check inside GogScriptInterpreterStep.appliesTo sees
the marker) and assert that GogScriptInterpreterStep.appliesTo(container,
GameSource.GOG, gameDir.absolutePath) then returns false; ensure you clean
up/remove the marker or reset the mock before the later variant assertions
(e.g., before switching container to Container.BIONIC).

---

Nitpick comments:
In `@app/src/main/java/app/gamenative/gamefixes/GameFixesRegistry.kt`:
- Line 41: The mutable shared var fixesProvider currently allows test-only
overrides without synchronization (symbol: fixesProvider) which the reviewer
flagged as overkill for thread-safety; either make the provider immutable by
initializing fixesProvider at construction time from the existing fixes map (use
the constructor to set fixesProvider = { fixes }) or add a test-only guard that
only permits overrides under a DEBUG/TEST flag (expose a
setOverridesForTests(...) helper) so production usage cannot mutate
fixesProvider at runtime; update usages that reset it in tests to call the new
test-only helper or rely on the immutable provider (refer to fixesProvider and
fixes to locate changes).

In `@app/src/test/java/app/gamenative/gamefixes/LaunchArgFixTest.kt`:
- Around line 43-53: Add a new unit test in LaunchArgFixTest that covers
whitespace-only execArgs by creating a test (e.g.,
apply_applies_whenContainerExecArgsIsWhitespace) that constructs
LaunchArgFix("-lang=eng"), mocks container.execArgs to return a string of only
spaces (e.g., "   "), calls fix.apply(context, "1129934535", "/tmp/game",
"A:\\", container), asserts the result is true, and verifies that
container.execArgs is assigned (and container.saveData() is invoked) — this
verifies LaunchArgFix.apply treats trim()-only whitespace as empty and applies
the fix.

In
`@app/src/test/java/app/gamenative/utils/launchdependencies/GogScriptInterpreterDependencyTest.kt`:
- Around line 65-72: The tests in GogScriptInterpreterDependencyTest create
temporary directories via createTempDirectory() (variables like installDir) and
never clean them up; replace those manual temp directories by using JUnit's
`@TempDir` (declare a TempDir field) and use that temp directory for the test
folders (or alternatively delete the created directories in an `@After` method),
updating the test cases that call createTempDirectory() (the instances around
the installDir and other temp folder creations) to use the shared
`@TempDir-managed` directory so cleanup is handled automatically.
- Around line 147-149: The final no-op assertion in
GogScriptInterpreterDependencyTest (assertTrue(true)) should be replaced with a
meaningful check that the interpreter exited gracefully: wrap the invocation
under test in an assertion like assertDoesNotThrow { /* call the method that
runs the interpreter */ } and/or assert expected mock interactions (e.g.,
verifyNoMoreInteractions(mockInstaller) or verify(mockLogger).info(...)) to
confirm no unexpected behavior; update the test in class
GogScriptInterpreterDependencyTest to call assertDoesNotThrow around the
interpreter run and add verifyNoMoreInteractions/verify calls for the relevant
mocks used in the test.

In `@app/src/test/java/app/gamenative/utils/LaunchDependenciesTest.kt`:
- Around line 138-171: The test
ensureLaunchDependencies_resetsLoadingUi_evenIfInstallFails currently catches
IllegalStateException without asserting it was thrown; change the test to
explicitly assert the exception from sut.ensureLaunchDependencies (for example
using assertFailsWith<IllegalStateException> or capturing a Boolean/flag) while
keeping the existing checks on messages.last() and progress.last(), and
reference the failing call to GogScriptInterpreterDependency.install invoked via
sut.ensureLaunchDependencies to ensure the install exception is actually
propagated.

In `@app/src/test/java/app/gamenative/utils/preInstallSteps/VcRedistStepTest.kt`:
- Line 47: Remove the redundant stubbing of container.drives in the
VcRedistStepTest: delete the line that does every { container.drives } returns
"A:${gameDir.absolutePath}" since VcRedistStep.buildCommand(...) derives
behavior from the gameDir file path and this stub is unnecessary noise; keep
other mocks intact and run the test to confirm no behavior change.

In `@app/src/test/java/app/gamenative/utils/PreInstallStepsTest.kt`:
- Around line 39-50: The test creates a temp directory via createTempDirectory()
assigned to gameDir in setUp() but never deletes it; update tearDown() to remove
the temp directory (gameDir) after tests (or replace createTempDirectory usage
with JUnit TemporaryFolder/TempDir rule) so the filesystem is cleaned; modify
the existing tearDown() (which currently calls
PreInstallSteps.setStepsProviderForTests(null)) to also delete gameDir (or
switch setUp/tearDown to use the TemporaryFolder/TempDir mechanism) and ensure
any mocking of container.drives still points to the cleaned/managed directory.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9e0281df-fab9-418c-bb0b-5977c8fc5fe3

📥 Commits

Reviewing files that changed from the base of the PR and between 24508c2 and d92c77d.

📒 Files selected for processing (17)
  • app/src/main/java/app/gamenative/gamefixes/GameFixesRegistry.kt
  • app/src/main/java/app/gamenative/utils/LaunchDependencies.kt
  • app/src/main/java/app/gamenative/utils/PreInstallSteps.kt
  • app/src/test/java/app/gamenative/gamefixes/GOGDependencyFixTest.kt
  • app/src/test/java/app/gamenative/gamefixes/GameFixesRegistryTest.kt
  • app/src/test/java/app/gamenative/gamefixes/KeyedGameFixTypesTest.kt
  • app/src/test/java/app/gamenative/gamefixes/LaunchArgFixTest.kt
  • app/src/test/java/app/gamenative/gamefixes/RegistryKeyFixTest.kt
  • app/src/test/java/app/gamenative/utils/LaunchDependenciesTest.kt
  • app/src/test/java/app/gamenative/utils/PreInstallStepsTest.kt
  • app/src/test/java/app/gamenative/utils/launchdependencies/GogScriptInterpreterDependencyTest.kt
  • app/src/test/java/app/gamenative/utils/preInstallSteps/GogScriptInterpreterStepTest.kt
  • app/src/test/java/app/gamenative/utils/preInstallSteps/OpenALStepTest.kt
  • app/src/test/java/app/gamenative/utils/preInstallSteps/PhysXStepTest.kt
  • app/src/test/java/app/gamenative/utils/preInstallSteps/UbisoftConnectStepTest.kt
  • app/src/test/java/app/gamenative/utils/preInstallSteps/VcRedistStepTest.kt
  • app/src/test/java/app/gamenative/utils/preInstallSteps/XnaFrameworkStepTest.kt

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@app/src/test/java/app/gamenative/utils/LaunchDependenciesTest.kt`:
- Around line 62-63: Tests like
getLaunchDependencies_returnsEmpty_whenDependencyDoesNotApply call
sut.getLaunchDependencies but still use the production LaunchDependency list,
making them brittle; update these tests to inject a controlled dependencies
provider into sut (either via the constructor or the available setter like
setDependenciesProvider or provideDependencies) before calling
sut.getLaunchDependencies so each test uses an explicit, minimal list (e.g.,
empty or one-mock LaunchDependency) rather than the global production list;
apply the same change to the other tests referenced (the ones around lines 69,
110, 140) so all behavior tests are list-independent.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 073f6333-6e1a-4434-aea3-b4f9750dd574

📥 Commits

Reviewing files that changed from the base of the PR and between d92c77d and 99e24ed.

📒 Files selected for processing (7)
  • app/src/test/java/app/gamenative/gamefixes/LaunchArgFixTest.kt
  • app/src/test/java/app/gamenative/gamefixes/RegistryKeyFixTest.kt
  • app/src/test/java/app/gamenative/utils/LaunchDependenciesTest.kt
  • app/src/test/java/app/gamenative/utils/PreInstallStepsTest.kt
  • app/src/test/java/app/gamenative/utils/launchdependencies/GogScriptInterpreterDependencyTest.kt
  • app/src/test/java/app/gamenative/utils/preInstallSteps/GogScriptInterpreterStepTest.kt
  • app/src/test/java/app/gamenative/utils/preInstallSteps/VcRedistStepTest.kt
🚧 Files skipped from review as they are similar to previous changes (6)
  • app/src/test/java/app/gamenative/utils/preInstallSteps/VcRedistStepTest.kt
  • app/src/test/java/app/gamenative/gamefixes/LaunchArgFixTest.kt
  • app/src/test/java/app/gamenative/utils/PreInstallStepsTest.kt
  • app/src/test/java/app/gamenative/gamefixes/RegistryKeyFixTest.kt
  • app/src/test/java/app/gamenative/utils/launchdependencies/GogScriptInterpreterDependencyTest.kt
  • app/src/test/java/app/gamenative/utils/preInstallSteps/GogScriptInterpreterStepTest.kt

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (3)
app/src/test/java/app/gamenative/utils/PreInstallStepsTest.kt (1)

122-135: Consider documenting marker list sync requirement.

The expectedMarkers list is a snapshot of PreInstallSteps.steps.map { it.marker }. If new steps are added to production code, this test will pass but under-assert. A brief comment acknowledging this trade-off (per PR objectives) would help future maintainers.

📝 Suggested documentation
     `@Test`
     fun markAllDone_createsAllPreInstallMarkerFiles() {
         PreInstallSteps.markAllDone(container)
 
+        // Note: This list mirrors the production steps list. If steps are added,
+        // update this list to maintain full coverage.
         val expectedMarkers = listOf(
             Marker.VCREDIST_INSTALLED,
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/src/test/java/app/gamenative/utils/PreInstallStepsTest.kt` around lines
122 - 135, The test markAllDone_createsAllPreInstallMarkerFiles uses a
hard-coded expectedMarkers list that is a snapshot of PreInstallSteps.steps.map
{ it.marker }; add a brief inline comment above the expectedMarkers declaration
explaining this snapshot must be kept in sync with PreInstallSteps.steps (or
updated if new steps are added) so future maintainers understand the trade-off
and why the list is explicit rather than derived from PreInstallSteps.steps.
app/src/test/java/app/gamenative/utils/LaunchDependenciesTest.kt (1)

144-181: Consider using assertThrows for cleaner exception assertion.

The try-catch pattern works but assertThrows is more idiomatic and concise.

♻️ Alternative using assertThrows
`@Test`
fun ensureLaunchDependencies_resetsLoadingUi_evenIfInstallFails() = runBlocking {
    // ... setup ...
    
    val messages = mutableListOf<String>()
    val progress = mutableListOf<Float>()

    assertThrows(IllegalStateException::class.java) {
        runBlocking {
            sut.ensureLaunchDependencies(
                context = context,
                container = container,
                gameSource = GameSource.GOG,
                gameId = 9,
                setLoadingMessage = { messages += it },
                setLoadingProgress = { progress += it },
            )
        }
    }

    assertEquals(context.getString(R.string.main_loading), messages.last())
    assertEquals(1f, progress.last())
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/src/test/java/app/gamenative/utils/LaunchDependenciesTest.kt` around
lines 144 - 181, Replace the manual try/catch/flag pattern in the test
ensureLaunchDependencies_resetsLoadingUi_evenIfInstallFails with JUnit's
assertThrows to make the exception assertion concise and idiomatic: call
assertThrows(IllegalStateException::class.java) and inside its lambda invoke
sut.ensureLaunchDependencies(...) (wrapping in runBlocking if needed), then keep
the existing checks on messages.last() and progress.last(); this targets the
sut.ensureLaunchDependencies invocation and preserves the setup for
GogScriptInterpreterDependency and the message/progress collections.
app/src/test/java/app/gamenative/utils/preInstallSteps/GogScriptInterpreterStepTest.kt (1)

36-39: Temp directory not cleaned up in tearDown.

The gameDir is created via createTempDirectory() but never deleted. While temp directories are eventually cleaned by the OS, explicit cleanup ensures test isolation and avoids accumulating test artifacts.

♻️ Suggested fix
     `@After`
     fun tearDown() {
         unmockkAll()
+        gameDir.deleteRecursively()
     }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@app/src/test/java/app/gamenative/utils/preInstallSteps/GogScriptInterpreterStepTest.kt`
around lines 36 - 39, The tearDown method in GogScriptInterpreterStepTest
currently only calls unmockkAll() but doesn't delete the temporary directory
created by createTempDirectory() (gameDir); update tearDown to safely delete
gameDir (e.g., if gameDir is a Path/File use
gameDir.toFile().deleteRecursively() or a Files.walkFileTree cleanup) with a
null/existence check and optional try/catch to avoid hiding test failures, then
call unmockkAll(); ensure you reference the class variable gameDir and keep
tearDown annotated `@After`.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@app/src/test/java/app/gamenative/utils/PreInstallStepsTest.kt`:
- Around line 23-37: The test file declares FakeStep implementing PreInstallStep
but lacks the import for the PreInstallStep interface; add the missing import
for PreInstallStep at the top of app/src/test/java/.../PreInstallStepsTest.kt so
the FakeStep declaration (FakeStep, PreInstallStep) compiles, then re-run the
tests to confirm compilation passes.

---

Nitpick comments:
In `@app/src/test/java/app/gamenative/utils/LaunchDependenciesTest.kt`:
- Around line 144-181: Replace the manual try/catch/flag pattern in the test
ensureLaunchDependencies_resetsLoadingUi_evenIfInstallFails with JUnit's
assertThrows to make the exception assertion concise and idiomatic: call
assertThrows(IllegalStateException::class.java) and inside its lambda invoke
sut.ensureLaunchDependencies(...) (wrapping in runBlocking if needed), then keep
the existing checks on messages.last() and progress.last(); this targets the
sut.ensureLaunchDependencies invocation and preserves the setup for
GogScriptInterpreterDependency and the message/progress collections.

In
`@app/src/test/java/app/gamenative/utils/preInstallSteps/GogScriptInterpreterStepTest.kt`:
- Around line 36-39: The tearDown method in GogScriptInterpreterStepTest
currently only calls unmockkAll() but doesn't delete the temporary directory
created by createTempDirectory() (gameDir); update tearDown to safely delete
gameDir (e.g., if gameDir is a Path/File use
gameDir.toFile().deleteRecursively() or a Files.walkFileTree cleanup) with a
null/existence check and optional try/catch to avoid hiding test failures, then
call unmockkAll(); ensure you reference the class variable gameDir and keep
tearDown annotated `@After`.

In `@app/src/test/java/app/gamenative/utils/PreInstallStepsTest.kt`:
- Around line 122-135: The test markAllDone_createsAllPreInstallMarkerFiles uses
a hard-coded expectedMarkers list that is a snapshot of
PreInstallSteps.steps.map { it.marker }; add a brief inline comment above the
expectedMarkers declaration explaining this snapshot must be kept in sync with
PreInstallSteps.steps (or updated if new steps are added) so future maintainers
understand the trade-off and why the list is explicit rather than derived from
PreInstallSteps.steps.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 899eb86a-6b2d-4854-a52a-2399a944008b

📥 Commits

Reviewing files that changed from the base of the PR and between 99e24ed and 6a422a0.

📒 Files selected for processing (7)
  • app/src/test/java/app/gamenative/gamefixes/LaunchArgFixTest.kt
  • app/src/test/java/app/gamenative/gamefixes/RegistryKeyFixTest.kt
  • app/src/test/java/app/gamenative/utils/LaunchDependenciesTest.kt
  • app/src/test/java/app/gamenative/utils/PreInstallStepsTest.kt
  • app/src/test/java/app/gamenative/utils/launchdependencies/GogScriptInterpreterDependencyTest.kt
  • app/src/test/java/app/gamenative/utils/preInstallSteps/GogScriptInterpreterStepTest.kt
  • app/src/test/java/app/gamenative/utils/preInstallSteps/VcRedistStepTest.kt
🚧 Files skipped from review as they are similar to previous changes (3)
  • app/src/test/java/app/gamenative/gamefixes/RegistryKeyFixTest.kt
  • app/src/test/java/app/gamenative/gamefixes/LaunchArgFixTest.kt
  • app/src/test/java/app/gamenative/utils/preInstallSteps/VcRedistStepTest.kt

@unbelievableflavour unbelievableflavour changed the title More viable unit tests for new key parts of our application [Tests] More viable unit tests for new key parts of our application Apr 8, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (3)
app/src/test/java/app/gamenative/utils/LaunchDependenciesTest.kt (1)

144-182: LGTM with optional style improvement.

This test correctly verifies that the finally block resets the loading UI even when install() throws an exception—important coverage for the try-finally guarantee.

Minor style nit: Line 178 could use assertNotNull(thrown) instead of assertTrue(thrown != null) for more idiomatic JUnit assertions.

♻️ Optional style improvement
-        assertTrue(thrown != null)
+        assertNotNull(thrown)

You'll need to add the import:

import org.junit.Assert.assertNotNull
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/src/test/java/app/gamenative/utils/LaunchDependenciesTest.kt` around
lines 144 - 182, Replace the non-idiomatic null check in the test
ensureLaunchDependencies_resetsLoadingUi_evenIfInstallFails by using
assertNotNull(thrown) instead of assertTrue(thrown != null), and add the
corresponding import org.junit.Assert.assertNotNull so the assertion compiles;
keep the rest of the test (variables thrown, messages, progress, and final
assertions) unchanged.
app/src/test/java/app/gamenative/utils/preInstallSteps/GogScriptInterpreterStepTest.kt (1)

36-39: Consider adding temp directory cleanup for consistency.

The tearDown method unmocks objects but doesn't clean up the temporary directory created in setUp. For consistency with PreInstallStepsTest.kt, consider adding gameDir.deleteRecursively().

♻️ Suggested addition
     `@After`
     fun tearDown() {
         unmockkAll()
+        gameDir.deleteRecursively()
     }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@app/src/test/java/app/gamenative/utils/preInstallSteps/GogScriptInterpreterStepTest.kt`
around lines 36 - 39, The tearDown() currently only calls unmockkAll() but
doesn't remove the temporary gameDir created in setUp; update the
GogScriptInterpreterStepTest.tearDown method to also clean up the temp directory
by invoking gameDir.deleteRecursively() (call it before or after unmockkAll() as
appropriate) so the temporary files are removed consistently with
PreInstallStepsTest.
app/src/test/java/app/gamenative/utils/preInstallSteps/VcRedistStepTest.kt (1)

23-27: Consider adding cleanup for the temporary directory.

The test creates a temporary directory in setUp but doesn't clean it up. While createTempDirectory files are eventually removed by the OS, explicit cleanup improves test hygiene and matches the pattern used in PreInstallStepsTest.kt.

♻️ Suggested cleanup addition
+    `@After`
+    fun tearDown() {
+        gameDir.deleteRecursively()
+    }
+
     `@Test`
     fun appliesTo_returnsTrue_whenMarkerMissing() {
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/src/test/java/app/gamenative/utils/preInstallSteps/VcRedistStepTest.kt`
around lines 23 - 27, Add explicit cleanup for the temp directory created in
setUp(): ensure the VcRedistStepTest class removes gameDir after each test by
adding an `@After` teardown method that checks gameDir for null and deletes it
recursively (mirror the pattern used in PreInstallStepsTest.kt); reference the
setUp() method, the gameDir property and the createTempDirectory call when
locating where to add the teardown.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@app/src/test/java/app/gamenative/utils/LaunchDependenciesTest.kt`:
- Around line 144-182: Replace the non-idiomatic null check in the test
ensureLaunchDependencies_resetsLoadingUi_evenIfInstallFails by using
assertNotNull(thrown) instead of assertTrue(thrown != null), and add the
corresponding import org.junit.Assert.assertNotNull so the assertion compiles;
keep the rest of the test (variables thrown, messages, progress, and final
assertions) unchanged.

In
`@app/src/test/java/app/gamenative/utils/preInstallSteps/GogScriptInterpreterStepTest.kt`:
- Around line 36-39: The tearDown() currently only calls unmockkAll() but
doesn't remove the temporary gameDir created in setUp; update the
GogScriptInterpreterStepTest.tearDown method to also clean up the temp directory
by invoking gameDir.deleteRecursively() (call it before or after unmockkAll() as
appropriate) so the temporary files are removed consistently with
PreInstallStepsTest.

In `@app/src/test/java/app/gamenative/utils/preInstallSteps/VcRedistStepTest.kt`:
- Around line 23-27: Add explicit cleanup for the temp directory created in
setUp(): ensure the VcRedistStepTest class removes gameDir after each test by
adding an `@After` teardown method that checks gameDir for null and deletes it
recursively (mirror the pattern used in PreInstallStepsTest.kt); reference the
setUp() method, the gameDir property and the createTempDirectory call when
locating where to add the teardown.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 023ee1fa-4c1e-49a9-bae2-072f0271f107

📥 Commits

Reviewing files that changed from the base of the PR and between 6a422a0 and d2a9884.

📒 Files selected for processing (7)
  • app/src/test/java/app/gamenative/gamefixes/LaunchArgFixTest.kt
  • app/src/test/java/app/gamenative/gamefixes/RegistryKeyFixTest.kt
  • app/src/test/java/app/gamenative/utils/LaunchDependenciesTest.kt
  • app/src/test/java/app/gamenative/utils/PreInstallStepsTest.kt
  • app/src/test/java/app/gamenative/utils/launchdependencies/GogScriptInterpreterDependencyTest.kt
  • app/src/test/java/app/gamenative/utils/preInstallSteps/GogScriptInterpreterStepTest.kt
  • app/src/test/java/app/gamenative/utils/preInstallSteps/VcRedistStepTest.kt
✅ Files skipped from review due to trivial changes (1)
  • app/src/test/java/app/gamenative/utils/launchdependencies/GogScriptInterpreterDependencyTest.kt
🚧 Files skipped from review as they are similar to previous changes (2)
  • app/src/test/java/app/gamenative/gamefixes/RegistryKeyFixTest.kt
  • app/src/test/java/app/gamenative/gamefixes/LaunchArgFixTest.kt

@unbelievableflavour unbelievableflavour changed the title [Tests] More viable unit tests for new key parts of our application tests: More viable unit tests for new key parts of our application Apr 8, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
app/src/test/java/app/gamenative/gamefixes/GOGDependencyFixTest.kt (1)

38-41: ⚠️ Potential issue | 🟠 Major

Use scoped MockK cleanup in tearDown() instead of global reset.

unmockkAll() on Line 40 clears global MockK state and can interfere with other tests. Here, only GOGService.Companion is object-mocked (Line 35), so cleanup should be targeted.

Suggested fix
-import io.mockk.unmockkAll
+import io.mockk.unmockkObject
@@
     `@After`
     fun tearDown() {
-        unmockkAll()
+        unmockkObject(GOGService.Companion)
     }
#!/bin/bash
# Verify this test class only object-mocks GOGService.Companion and uses broad cleanup.
rg -n --type kotlin -C2 '\bmockkObject\s*\(|\bunmockk(All|Object)\s*\(' app/src/test/java/app/gamenative/gamefixes/GOGDependencyFixTest.kt

Expected result: one mockkObject(GOGService.Companion) and unmockkAll() currently in tearDown(); after fix, unmockkObject(GOGService.Companion).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/src/test/java/app/gamenative/gamefixes/GOGDependencyFixTest.kt` around
lines 38 - 41, The teardown uses a global MockK cleanup (unmockkAll()) which can
affect other tests; replace it with a scoped cleanup by calling
unmockkObject(GOGService.Companion) in the tearDown() of GOGDependencyFixTest to
match the mockkObject(GOGService.Companion) used in the test setup (refer to the
tearDown function and the mockkObject call for GOGService.Companion).
🧹 Nitpick comments (2)
app/src/test/java/app/gamenative/utils/preInstallSteps/OpenALStepTest.kt (1)

22-26: Clean up temp directories after each test.

Line 25 creates a new temp directory per test, but there’s no teardown cleanup. Add an @After hook to prevent temp-dir buildup across repeated runs.

♻️ Proposed fix
 import org.junit.Before
+import org.junit.After
 import org.junit.Test
@@
 class OpenALStepTest {
@@
     `@Before`
     fun setUp() {
         container = mockk(relaxed = true)
         gameDir = createTempDirectory(prefix = "openal-step-test").toFile()
     }
+
+    `@After`
+    fun tearDown() {
+        if (::gameDir.isInitialized) {
+            gameDir.deleteRecursively()
+        }
+    }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/src/test/java/app/gamenative/utils/preInstallSteps/OpenALStepTest.kt`
around lines 22 - 26, Tests create a temporary directory in setUp (gameDir in
OpenALStepTest) but never remove it; add an `@After` annotated teardown method
(e.g., tearDown) that deletes the temp directory (call
gameDir.deleteRecursively() or equivalent) to clean up after each test and
prevent temp-dir buildup across runs.
app/src/test/java/app/gamenative/utils/PreInstallStepsTest.kt (1)

39-45: Harden test isolation for the global steps provider.

Nice cleanup in tearDown(). To make this class fully order-independent, also reset PreInstallSteps.setStepsProviderForTests(null) in setUp() before stubbing the container.

Proposed patch
 `@Before`
 fun setUp() {
+    PreInstallSteps.setStepsProviderForTests(null)
     container = mockk(relaxed = true)
     gameDir = createTempDirectory(prefix = "preinstall-steps-test").toFile()
     every { container.drives } returns "A:${gameDir.absolutePath}"
     every { container.containerVariant } returns Container.BIONIC
 }

Also applies to: 47-50

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/src/test/java/app/gamenative/utils/PreInstallStepsTest.kt` around lines
39 - 45, The test setUp currently stubs container state without resetting the
global provider; call PreInstallSteps.setStepsProviderForTests(null) at the
start of setUp() (before mocking/stubbing container and gameDir) to ensure the
global steps provider is cleared and the test is order-independent; update the
setUp() method in PreInstallStepsTest (and the other similar setup at lines
47-50) to invoke PreInstallSteps.setStepsProviderForTests(null) before creating
mocks and setting every { container... }.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@app/src/test/java/app/gamenative/gamefixes/GOGDependencyFixTest.kt`:
- Around line 38-41: The teardown uses a global MockK cleanup (unmockkAll())
which can affect other tests; replace it with a scoped cleanup by calling
unmockkObject(GOGService.Companion) in the tearDown() of GOGDependencyFixTest to
match the mockkObject(GOGService.Companion) used in the test setup (refer to the
tearDown function and the mockkObject call for GOGService.Companion).

---

Nitpick comments:
In `@app/src/test/java/app/gamenative/utils/preInstallSteps/OpenALStepTest.kt`:
- Around line 22-26: Tests create a temporary directory in setUp (gameDir in
OpenALStepTest) but never remove it; add an `@After` annotated teardown method
(e.g., tearDown) that deletes the temp directory (call
gameDir.deleteRecursively() or equivalent) to clean up after each test and
prevent temp-dir buildup across runs.

In `@app/src/test/java/app/gamenative/utils/PreInstallStepsTest.kt`:
- Around line 39-45: The test setUp currently stubs container state without
resetting the global provider; call
PreInstallSteps.setStepsProviderForTests(null) at the start of setUp() (before
mocking/stubbing container and gameDir) to ensure the global steps provider is
cleared and the test is order-independent; update the setUp() method in
PreInstallStepsTest (and the other similar setup at lines 47-50) to invoke
PreInstallSteps.setStepsProviderForTests(null) before creating mocks and setting
every { container... }.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a088745e-b202-412d-b350-e79d79ef75e7

📥 Commits

Reviewing files that changed from the base of the PR and between d2a9884 and 5a65f01.

📒 Files selected for processing (17)
  • app/src/main/java/app/gamenative/gamefixes/GameFixesRegistry.kt
  • app/src/main/java/app/gamenative/utils/LaunchDependencies.kt
  • app/src/main/java/app/gamenative/utils/PreInstallSteps.kt
  • app/src/test/java/app/gamenative/gamefixes/GOGDependencyFixTest.kt
  • app/src/test/java/app/gamenative/gamefixes/GameFixesRegistryTest.kt
  • app/src/test/java/app/gamenative/gamefixes/KeyedGameFixTypesTest.kt
  • app/src/test/java/app/gamenative/gamefixes/LaunchArgFixTest.kt
  • app/src/test/java/app/gamenative/gamefixes/RegistryKeyFixTest.kt
  • app/src/test/java/app/gamenative/utils/LaunchDependenciesTest.kt
  • app/src/test/java/app/gamenative/utils/PreInstallStepsTest.kt
  • app/src/test/java/app/gamenative/utils/launchdependencies/GogScriptInterpreterDependencyTest.kt
  • app/src/test/java/app/gamenative/utils/preInstallSteps/GogScriptInterpreterStepTest.kt
  • app/src/test/java/app/gamenative/utils/preInstallSteps/OpenALStepTest.kt
  • app/src/test/java/app/gamenative/utils/preInstallSteps/PhysXStepTest.kt
  • app/src/test/java/app/gamenative/utils/preInstallSteps/UbisoftConnectStepTest.kt
  • app/src/test/java/app/gamenative/utils/preInstallSteps/VcRedistStepTest.kt
  • app/src/test/java/app/gamenative/utils/preInstallSteps/XnaFrameworkStepTest.kt
✅ Files skipped from review due to trivial changes (6)
  • app/src/test/java/app/gamenative/utils/preInstallSteps/XnaFrameworkStepTest.kt
  • app/src/test/java/app/gamenative/utils/preInstallSteps/VcRedistStepTest.kt
  • app/src/test/java/app/gamenative/utils/preInstallSteps/GogScriptInterpreterStepTest.kt
  • app/src/test/java/app/gamenative/utils/LaunchDependenciesTest.kt
  • app/src/test/java/app/gamenative/gamefixes/GameFixesRegistryTest.kt
  • app/src/test/java/app/gamenative/gamefixes/RegistryKeyFixTest.kt
🚧 Files skipped from review as they are similar to previous changes (7)
  • app/src/test/java/app/gamenative/gamefixes/KeyedGameFixTypesTest.kt
  • app/src/test/java/app/gamenative/utils/preInstallSteps/UbisoftConnectStepTest.kt
  • app/src/main/java/app/gamenative/utils/LaunchDependencies.kt
  • app/src/main/java/app/gamenative/utils/PreInstallSteps.kt
  • app/src/test/java/app/gamenative/gamefixes/LaunchArgFixTest.kt
  • app/src/test/java/app/gamenative/utils/preInstallSteps/PhysXStepTest.kt
  • app/src/test/java/app/gamenative/utils/launchdependencies/GogScriptInterpreterDependencyTest.kt

@unbelievableflavour unbelievableflavour changed the title tests: More viable unit tests for new key parts of our application tests: Added unit tests for new key parts of Gamenative Apr 10, 2026
@unbelievableflavour unbelievableflavour changed the title tests: Added unit tests for new key parts of Gamenative tests: Added unit tests for new key parts of Gamenative (+ slightly altered implementation for easier testing) Apr 10, 2026
@unbelievableflavour unbelievableflavour changed the title tests: Added unit tests for new key parts of Gamenative (+ slightly altered implementation for easier testing) tests: Added unit tests for new key parts of Gamenative Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant