Skip to content

refactor(ships): extract TestHelpers to different namespaces, remove reflection, add proper ship factories#70

Merged
lmProgramming merged 2 commits into
mainfrom
refactor/clean-up-ship-tests
Jun 11, 2026
Merged

refactor(ships): extract TestHelpers to different namespaces, remove reflection, add proper ship factories#70
lmProgramming merged 2 commits into
mainfrom
refactor/clean-up-ship-tests

Conversation

@lmProgramming

@lmProgramming lmProgramming commented Jun 10, 2026

Copy link
Copy Markdown
Owner

resolves #68

Summary by CodeRabbit

Release Notes

  • Bug Fixes

    • Pause menu now properly reports initialization errors when UI configuration is missing, instead of silently failing.
  • Tests

    • Refactored and reorganized test infrastructure to improve maintainability and consistency across the test suite.

@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR consolidates test infrastructure by introducing a centralized, fluent ShipTestBuilder and ShipTestFactory to eliminate duplicated ship-construction helpers across 10+ test files, reorganizes test utilities into focused namespaces (Fixtures, Mocks, Modules, Proxies, Factories), replaces reflection-based test introspection with compiler-guarded internal properties, and removes obsolete factory classes.

Changes

Test Infrastructure Consolidation and Refactoring

Layer / File(s) Summary
Assembly visibility and test-only internals
Assets/Scripts/Core/Ship/CrewMember.cs, Assets/Scripts/ShipFactory/ShipModuleSO.cs, Assets/Scripts/Ships/Modules/Cannon.cs
Production code now grants internal visibility to test assemblies via InternalsVisibleTo attributes; CrewMember and ShipModuleSO expose conditional test-only properties (OnDiedSubscriberCountForTesting, ConfigureForTesting) guarded by #if UNITY_INCLUDE_TESTS to allow safe test inspection without reflection.
New test builder and factory classes
Assets/Scripts/Ships/Tests/TestHelpers/Factories/ShipTestBuilder.cs, Assets/Scripts/Ships/Tests/TestHelpers/Factories/ShipTestFactory.cs, Assets/Scripts/Ships/Tests/TestHelpers/Factories/ModuleFactory.cs
ShipTestBuilder provides a comprehensive fluent API for assembling test ships with configurable command, crew, engine, power, and cannon modules; ShipTestFactory offers two convenient factory methods for pre-configured two-module and command-engine layouts; ModuleFactory moves to the Factories namespace and gains helper methods for attaching module components.
Test helper namespace organization
Assets/Scripts/Ships/Tests/TestHelpers/Fixtures/*, .../Mocks/*, .../Modules/*, .../Proxies/*
Reorganizes scattered test helpers into focused subdirectories: Fixtures (base classes, container setup), Mocks (catalogs and mock dependencies), Modules (test module types), Proxies (ship proxies), and Factories (factory and builder classes), each with corresponding .meta files and updated namespace declarations.
New mock implementations
Assets/Scripts/Ships/Tests/TestHelpers/Mocks/TestContentCatalog.cs, .../TestModuleCatalog.cs
Adds functional TestContentCatalog and TestModuleCatalog mocks with dictionary-backed ID↔prefab/sprite mappings and Add(...) methods for test population, replacing non-functional stubs.
CrewModule and event subscriber testing
Assets/Scripts/Ships/Tests/CrewModuleTests.cs
Replaces reflection-based delegate inspection with the new OnDiedSubscriberCountForTesting property to validate no subscription leaks after crew operations.
Two-module factory pattern adoption
Assets/Scripts/Ships/Tests/ModuleDestructionThresholdTests.cs, .../ModuleJointLifecycleTests.cs, .../ShipDestructionJunkTests.cs, and others
Five test files migrate to ShipTestFactory.CreateTwoModuleShip(...), removing duplicated local helpers and standardizing initialization.
Command+engine factory pattern adoption
Assets/Scripts/Ships/Tests/ModuleConnectionTests.cs, .../ShipDestroyAllModulesTests.cs
Migrates to ShipTestFactory.CreateShipWithCommandAndEngine(...) or builder-based command+engine setup, consolidating initialization logic.
Thrust allocator tests refactored to fluent builder
Assets/Scripts/Ships/Tests/ShipControlAllocatorThrustTests.cs
Comprehensively refactors from local EngineSpec struct and CreateShipWithEngines helper to fluent ShipTestBuilder chains with engine rotation and positioning; one test is renamed to reflect new two-symmetric-engines configuration.
Crew assignment tests with builder-based modules
Assets/Scripts/Ships/Tests/ShipCrewAssignmentTests.cs
Introduces BuildShipWithCrewModules helper using ShipTestBuilder to iterate crew-module configurations with skill assignment, eliminating duplicated module wiring.
Comprehensive disconnection tests refactored
Assets/Scripts/Ships/Tests/ShipDisconnectionTests.cs
Extensively refactors nine tests from multiple local helpers to fluent ShipTestBuilder and ShipTestFactory, including cannon-specific tests with WithoutGameObjectInjection().
Movement and snapshot service tests refactored
Assets/Scripts/Ships/Tests/ShipGameplayMovementTests.cs, .../ShipSnapshotServiceTests.cs
Refactors to use ShipTestBuilder for ship construction and new TestContentCatalog/TestModuleCatalog mocks, eliminating local helper classes and reflection-based field setup.
Removal of old test infrastructure
Assets/Scripts/Ships/Tests/TestHelpers/SmallMovableShipTestFactory.cs, .../TestContentCatalog.cs, .../TestModuleCatalog.cs
Deletes SmallMovableShipTestFactory (replaced by ShipTestBuilder) and removes old test helper root implementations, now provided as functional mocks in the Mocks namespace.
UI error handling improvement
Assets/Scripts/UI/MainGame/PauseMenuController.cs
Changes OnEnable to throw an explicit UnityException instead of silently returning on missing UI document, improving error visibility.
ShipFactory test support
Assets/Scripts/ShipFactory/Tests/LegalPositionCalculator/CalculatorTests.cs
Refactors to use ShipModuleSO.ConfigureForTesting() instead of reflection-based field access.
E2E test imports updated
Assets/Scripts/E2E/E2ETestBase.cs
Updates imports to reference specific test-helper namespaces (Factories, Mocks) instead of the broad Ships.Tests.TestHelpers namespace.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

Poem

🐰 No more mirrors in the test aisle,

One builder to rule them all with style,

Reflection gone, just type-safe calls,

Organized helpers in their halls,

Tests are cleaner, duplication falls!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 2.08% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed The PR successfully addresses all three coding objectives from issue #68: consolidating duplicated test approaches via ShipTestBuilder and ShipTestFactory, centralizing common functionality in TestHelpers namespaces, and removing reflection-based field access throughout tests.
Out of Scope Changes check ✅ Passed All changes directly support the stated objectives. The only exception is PauseMenuController.cs exception handling change, which appears tangential to the ship tests refactoring but does not significantly impact the PR scope.
Title check ✅ Passed The PR title accurately describes the main changes: extracting TestHelpers into namespaces, removing reflection usage, and adding ship factories.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/clean-up-ship-tests

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
Assets/Scripts/Ships/Tests/ModuleJointLifecycleTests.cs (1)

48-52: 🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win

Remove debug logging artifacts.

Non-descriptive debug logs ("mkay0", "mkay", "mkay2") appear to be leftover debugging artifacts that should be removed before merging.

🧹 Proposed cleanup
-            Debug.Log("mkay0");
             Object.Destroy(other.gameObject);
-            Debug.Log("mkay");
             yield return WaitForLifecycle();
-            Debug.Log("mkay2");
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Assets/Scripts/Ships/Tests/ModuleJointLifecycleTests.cs` around lines 48 -
52, In ModuleJointLifecycleTests remove the non-descriptive Debug.Log calls
("mkay0", "mkay", "mkay2") that were left in the test; locate the test method in
the ModuleJointLifecycleTests class where Object.Destroy(other.gameObject) and
yield return WaitForLifecycle() are used and delete those Debug.Log statements
so the test output is clean and only contains meaningful logs or assertions.
Assets/Scripts/Ships/Tests/ShipDisconnectionTests.cs (1)

137-147: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Missing assertion makes test ineffective.

The test computes a boolean expression (lines 137-139) but discards the result with _ and never asserts on it. Lines 142-147 only log the outcome. Without an assertion, this test cannot fail and provides no verification of the alternate-path behavior.

🔍 Proposed fix to add missing assertion
             // Assert: If alternate path exists through C, moduleA should stay connected
             // This depends on the actual topology created - verify the graph state
-            _ = ship.ModuleGraph.ContainsNode(moduleA) &&
-                ship.ModuleGraph.ContainsNode(moduleB) &&
-                ship.ModuleGraph.ContainsNode(moduleC);
+            var aConnected = ship.ModuleGraph.ContainsNode(moduleA);
+            var bConnected = ship.ModuleGraph.ContainsNode(moduleB);
+            var cConnected = ship.ModuleGraph.ContainsNode(moduleC);
 
             // Log the result for diagnostic purposes
-            Debug.Log($"After removing A-Command connection: A={ship.ModuleGraph.ContainsNode(moduleA)}, " +
-                      $"B={ship.ModuleGraph.ContainsNode(moduleB)}, C={ship.ModuleGraph.ContainsNode(moduleC)}");
+            Debug.Log($"After removing A-Command connection: A={aConnected}, B={bConnected}, C={cConnected}");
 
-            // The actual assertion depends on whether an alternate path exists
-            // If C connects A to B and B connects to Command, A should stay
+            // All modules should remain connected via alternate paths
+            Assert.IsTrue(aConnected, "Module A should stay connected via alternate path through C");
+            Assert.IsTrue(bConnected, "Module B should stay connected to Command");
+            Assert.IsTrue(cConnected, "Module C should stay connected");
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Assets/Scripts/Ships/Tests/ShipDisconnectionTests.cs` around lines 137 - 147,
Replace the discarded boolean with an actual assertion: instead of "_ =
ship.ModuleGraph.ContainsNode(moduleA) && ...", call an NUnit/Unity assertion
such as Assert.IsTrue(ship.ModuleGraph.ContainsNode(moduleA) &&
ship.ModuleGraph.ContainsNode(moduleB) &&
ship.ModuleGraph.ContainsNode(moduleC), "After removing A-Command connection
expected nodes A, B, C to be present (alternate-path behavior)"); reference the
same symbols ship.ModuleGraph.ContainsNode, moduleA, moduleB, moduleC and keep
or adjust the Debug.Log message for diagnostics as needed.
🧹 Nitpick comments (3)
Assets/Scripts/Ships/Tests/TestHelpers/Factories/ShipTestBuilder.cs (1)

91-99: ⚡ Quick win

Fragile child-index assumption in engine retrieval.

Line 96 retrieves the engine by assuming it's the last child added (GetChild(childCount - 1)). This works currently because CreateEngineModule was just called, but breaks if the creation order changes or if methods are composed differently.

Consider having CreateEngineModule return the Engine component so it can be captured directly, or store a reference before adding other children.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Assets/Scripts/Ships/Tests/TestHelpers/Factories/ShipTestBuilder.cs` around
lines 91 - 99, The code in ShipTestBuilder.WithEngineModule relies on a fragile
GetChild(childCount - 1) to locate the newly created Engine; instead change the
creation API or capture the created object: modify
ModuleFactory.CreateEngineModule to return the created Engine (or the created
GameObject) and update WithEngineModule to use that returned Engine instance to
add to _engines (or alternatively have CreateEngineModule accept an out/ref
parameter to provide the Engine). Update references in WithEngineModule so it no
longer uses _shipGo.transform.GetChild(...), but directly uses the returned
Engine object when calling _engines.Add(engine).
Assets/Scripts/Ships/Tests/TestHelpers/Mocks/TestModuleCatalog.cs (1)

16-19: 💤 Low value

Consider explicit handling of duplicate keys.

The Add method silently overwrites existing entries via the dictionary indexer. While this can be useful for test flexibility, it may hide mistakes if the same archetype ID is accidentally registered twice. Consider either:

  • Documenting the overwrite behavior, or
  • Throwing when a duplicate key is added (if overwriting is unintended), or
  • Renaming to AddOrUpdate to signal the overwrite semantics
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Assets/Scripts/Ships/Tests/TestHelpers/Mocks/TestModuleCatalog.cs` around
lines 16 - 19, The Add method in TestModuleCatalog currently overwrites existing
entries in the _idToPrefab dictionary; change it to explicitly handle duplicates
by checking _idToPrefab.ContainsKey(id) and throwing an ArgumentException (or
InvalidOperationException) with a clear message including the id when a
duplicate is added, so accidental double-registration fails fast; if overwriting
is intended instead, rename the method to AddOrUpdate and document the behavior
and update any tests that rely on the current overwrite semantics.
Assets/Scripts/Ships/Tests/TestHelpers/Mocks/TestContentCatalog.cs (1)

34-44: ⚡ Quick win

Consider adding validation for test helper robustness.

The AddPrefab and AddSprite methods use dictionary indexer assignment, which:

  • Silently overwrites if the same id is registered twice
  • Accepts null parameters without validation

While this may provide flexibility in test setup, it can hide test bugs if a test accidentally registers duplicate IDs or passes null values.

🛡️ Optional defensive guards
 public void AddPrefab(string id, GameObject prefab)
 {
+    if (string.IsNullOrEmpty(id)) throw new System.ArgumentNullException(nameof(id));
+    if (prefab == null) throw new System.ArgumentNullException(nameof(prefab));
+    if (_idToPrefab.ContainsKey(id)) throw new System.InvalidOperationException($"Prefab with id '{id}' already registered");
     _idToPrefab[id] = prefab;
     _prefabToId[prefab] = id;
 }

 public void AddSprite(string id, Sprite sprite)
 {
+    if (string.IsNullOrEmpty(id)) throw new System.ArgumentNullException(nameof(id));
+    if (sprite == null) throw new System.ArgumentNullException(nameof(sprite));
+    if (_idToSprite.ContainsKey(id)) throw new System.InvalidOperationException($"Sprite with id '{id}' already registered");
     _idToSprite[id] = sprite;
     _spriteToId[sprite] = id;
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Assets/Scripts/Ships/Tests/TestHelpers/Mocks/TestContentCatalog.cs` around
lines 34 - 44, Add defensive validation to AddPrefab and AddSprite: check
parameters for null and ensure you don't silently overwrite existing mappings by
verifying _idToPrefab/_idToSprite and _prefabToId/_spriteToId don't already
contain the given id or object; if null, throw ArgumentNullException, and if the
id or object is already registered, throw an ArgumentException (or use TryAdd
and fail loudly) so duplicate registrations are caught in tests. This applies to
the methods AddPrefab and AddSprite and the backing dictionaries _idToPrefab,
_prefabToId, _idToSprite, and _spriteToId.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Assets/Scripts/Ships/Tests/TestHelpers/Factories/ShipTestBuilder.cs`:
- Around line 210-221: The if-check in WireShip<T> uses inverted logic and is
redundant: it calls _shipGo.SetActive(false) only when !_shipGo.activeSelf
(already inactive), while ModuleFactory.WireShip later forcefully toggles active
state; either remove the entire if-block (the lines referencing _parent,
_deactivateBeforeWire and _shipGo.SetActive(false)) or correct the condition to
"if (_parent != null && _deactivateBeforeWire && _shipGo.activeSelf)
_shipGo.SetActive(false)" so the GameObject is deactivated only when currently
active; update WireShip<T> accordingly and keep ModuleFactory.WireShip behavior
consistent.

In `@Assets/Scripts/UI/MainGame/PauseMenuController.cs`:
- Around line 52-53: The current guard in PauseMenuController checks both
uiDocument and uiDocument.rootVisualElement but throws a message that only
mentions the UI Document; update the check to distinguish the two failure cases
by either splitting into two ifs or by throwing a clearer message. Specifically,
in the method containing the guard (where uiDocument is validated), add one
check that throws e.g. UnityException("[PauseMenuController] uiDocument is
null.") when uiDocument == null, and a separate check that throws
UnityException("[PauseMenuController] uiDocument.rootVisualElement is null.")
when uiDocument != null && uiDocument.rootVisualElement == null so runtime
errors point to the exact missing dependency.

---

Outside diff comments:
In `@Assets/Scripts/Ships/Tests/ModuleJointLifecycleTests.cs`:
- Around line 48-52: In ModuleJointLifecycleTests remove the non-descriptive
Debug.Log calls ("mkay0", "mkay", "mkay2") that were left in the test; locate
the test method in the ModuleJointLifecycleTests class where
Object.Destroy(other.gameObject) and yield return WaitForLifecycle() are used
and delete those Debug.Log statements so the test output is clean and only
contains meaningful logs or assertions.

In `@Assets/Scripts/Ships/Tests/ShipDisconnectionTests.cs`:
- Around line 137-147: Replace the discarded boolean with an actual assertion:
instead of "_ = ship.ModuleGraph.ContainsNode(moduleA) && ...", call an
NUnit/Unity assertion such as
Assert.IsTrue(ship.ModuleGraph.ContainsNode(moduleA) &&
ship.ModuleGraph.ContainsNode(moduleB) &&
ship.ModuleGraph.ContainsNode(moduleC), "After removing A-Command connection
expected nodes A, B, C to be present (alternate-path behavior)"); reference the
same symbols ship.ModuleGraph.ContainsNode, moduleA, moduleB, moduleC and keep
or adjust the Debug.Log message for diagnostics as needed.

---

Nitpick comments:
In `@Assets/Scripts/Ships/Tests/TestHelpers/Factories/ShipTestBuilder.cs`:
- Around line 91-99: The code in ShipTestBuilder.WithEngineModule relies on a
fragile GetChild(childCount - 1) to locate the newly created Engine; instead
change the creation API or capture the created object: modify
ModuleFactory.CreateEngineModule to return the created Engine (or the created
GameObject) and update WithEngineModule to use that returned Engine instance to
add to _engines (or alternatively have CreateEngineModule accept an out/ref
parameter to provide the Engine). Update references in WithEngineModule so it no
longer uses _shipGo.transform.GetChild(...), but directly uses the returned
Engine object when calling _engines.Add(engine).

In `@Assets/Scripts/Ships/Tests/TestHelpers/Mocks/TestContentCatalog.cs`:
- Around line 34-44: Add defensive validation to AddPrefab and AddSprite: check
parameters for null and ensure you don't silently overwrite existing mappings by
verifying _idToPrefab/_idToSprite and _prefabToId/_spriteToId don't already
contain the given id or object; if null, throw ArgumentNullException, and if the
id or object is already registered, throw an ArgumentException (or use TryAdd
and fail loudly) so duplicate registrations are caught in tests. This applies to
the methods AddPrefab and AddSprite and the backing dictionaries _idToPrefab,
_prefabToId, _idToSprite, and _spriteToId.

In `@Assets/Scripts/Ships/Tests/TestHelpers/Mocks/TestModuleCatalog.cs`:
- Around line 16-19: The Add method in TestModuleCatalog currently overwrites
existing entries in the _idToPrefab dictionary; change it to explicitly handle
duplicates by checking _idToPrefab.ContainsKey(id) and throwing an
ArgumentException (or InvalidOperationException) with a clear message including
the id when a duplicate is added, so accidental double-registration fails fast;
if overwriting is intended instead, rename the method to AddOrUpdate and
document the behavior and update any tests that rely on the current overwrite
semantics.
🪄 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 Plus

Run ID: 30ab7a9d-7fe6-4eb0-82c1-70b90c251a37

📥 Commits

Reviewing files that changed from the base of the PR and between 0fc7a24 and c6ca0be.

📒 Files selected for processing (54)
  • Assets/Scripts/Core/Ship/CrewMember.cs
  • Assets/Scripts/E2E/E2ETestBase.cs
  • Assets/Scripts/ShipFactory/ShipModuleSO.cs
  • Assets/Scripts/ShipFactory/Tests/LegalPositionCalculator/CalculatorTests.cs
  • Assets/Scripts/Ships/Modules/Cannon.cs
  • Assets/Scripts/Ships/Tests/CrewModuleTests.cs
  • Assets/Scripts/Ships/Tests/ModuleConnectionTests.cs
  • Assets/Scripts/Ships/Tests/ModuleDestructionThresholdTests.cs
  • Assets/Scripts/Ships/Tests/ModuleJointLifecycleTests.cs
  • Assets/Scripts/Ships/Tests/ShipControlAllocatorThrustTests.cs
  • Assets/Scripts/Ships/Tests/ShipCrewAssignmentTests.cs
  • Assets/Scripts/Ships/Tests/ShipDestroyAllModulesTests.cs
  • Assets/Scripts/Ships/Tests/ShipDestructionJunkTests.cs
  • Assets/Scripts/Ships/Tests/ShipDisconnectionTests.cs
  • Assets/Scripts/Ships/Tests/ShipGameplayMovementTests.cs
  • Assets/Scripts/Ships/Tests/ShipSnapshotServiceTests.cs
  • Assets/Scripts/Ships/Tests/TestHelpers/Factories.meta
  • Assets/Scripts/Ships/Tests/TestHelpers/Factories/ModuleFactory.cs
  • Assets/Scripts/Ships/Tests/TestHelpers/Factories/ModuleFactory.cs.meta
  • Assets/Scripts/Ships/Tests/TestHelpers/Factories/ShipTestBuilder.cs
  • Assets/Scripts/Ships/Tests/TestHelpers/Factories/ShipTestBuilder.cs.meta
  • Assets/Scripts/Ships/Tests/TestHelpers/Factories/ShipTestFactory.cs
  • Assets/Scripts/Ships/Tests/TestHelpers/Factories/ShipTestFactory.cs.meta
  • Assets/Scripts/Ships/Tests/TestHelpers/Fixtures.meta
  • Assets/Scripts/Ships/Tests/TestHelpers/Fixtures/ShipTestBase.cs
  • Assets/Scripts/Ships/Tests/TestHelpers/Fixtures/ShipTestBase.cs.meta
  • Assets/Scripts/Ships/Tests/TestHelpers/Fixtures/TestContainerFactory.cs
  • Assets/Scripts/Ships/Tests/TestHelpers/Fixtures/TestContainerFactory.cs.meta
  • Assets/Scripts/Ships/Tests/TestHelpers/Fixtures/Utils.cs
  • Assets/Scripts/Ships/Tests/TestHelpers/Fixtures/Utils.cs.meta
  • Assets/Scripts/Ships/Tests/TestHelpers/Mocks.meta
  • Assets/Scripts/Ships/Tests/TestHelpers/Mocks/TestContentCatalog.cs
  • Assets/Scripts/Ships/Tests/TestHelpers/Mocks/TestContentCatalog.cs.meta
  • Assets/Scripts/Ships/Tests/TestHelpers/Mocks/TestDebrisSpawner.cs
  • Assets/Scripts/Ships/Tests/TestHelpers/Mocks/TestDebrisSpawner.cs.meta
  • Assets/Scripts/Ships/Tests/TestHelpers/Mocks/TestMapInfo.cs
  • Assets/Scripts/Ships/Tests/TestHelpers/Mocks/TestMapInfo.cs.meta
  • Assets/Scripts/Ships/Tests/TestHelpers/Mocks/TestModuleCatalog.cs
  • Assets/Scripts/Ships/Tests/TestHelpers/Mocks/TestModuleCatalog.cs.meta
  • Assets/Scripts/Ships/Tests/TestHelpers/Modules.meta
  • Assets/Scripts/Ships/Tests/TestHelpers/Modules/TestModule.cs
  • Assets/Scripts/Ships/Tests/TestHelpers/Modules/TestModule.cs.meta
  • Assets/Scripts/Ships/Tests/TestHelpers/Modules/TestPowerModule.cs
  • Assets/Scripts/Ships/Tests/TestHelpers/Modules/TestPowerModule.cs.meta
  • Assets/Scripts/Ships/Tests/TestHelpers/Proxies.meta
  • Assets/Scripts/Ships/Tests/TestHelpers/Proxies/MovableShipTestProxy.cs
  • Assets/Scripts/Ships/Tests/TestHelpers/Proxies/MovableShipTestProxy.cs.meta
  • Assets/Scripts/Ships/Tests/TestHelpers/Proxies/ShipTestProxy.cs
  • Assets/Scripts/Ships/Tests/TestHelpers/Proxies/ShipTestProxy.cs.meta
  • Assets/Scripts/Ships/Tests/TestHelpers/SmallMovableShipTestFactory.cs
  • Assets/Scripts/Ships/Tests/TestHelpers/SmallMovableShipTestFactory.cs.meta
  • Assets/Scripts/Ships/Tests/TestHelpers/TestContentCatalog.cs
  • Assets/Scripts/Ships/Tests/TestHelpers/TestModuleCatalog.cs
  • Assets/Scripts/UI/MainGame/PauseMenuController.cs
💤 Files with no reviewable changes (4)
  • Assets/Scripts/Ships/Tests/TestHelpers/SmallMovableShipTestFactory.cs.meta
  • Assets/Scripts/Ships/Tests/TestHelpers/TestModuleCatalog.cs
  • Assets/Scripts/Ships/Tests/TestHelpers/TestContentCatalog.cs
  • Assets/Scripts/Ships/Tests/TestHelpers/SmallMovableShipTestFactory.cs

Comment thread Assets/Scripts/Ships/Tests/TestHelpers/Factories/ShipTestBuilder.cs
Comment thread Assets/Scripts/UI/MainGame/PauseMenuController.cs
@lmProgramming lmProgramming changed the title refactor(ships): extract TestHelpers to different namespaces, remove remove reflection, add proper ship factories refactor(ships): extract TestHelpers to different namespaces, remove reflection, add proper ship factories Jun 11, 2026
@lmProgramming lmProgramming merged commit d6affce into main Jun 11, 2026
1 check passed
@lmProgramming lmProgramming deleted the refactor/clean-up-ship-tests branch June 11, 2026 19:28
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.

refactor the not great Ships tests

1 participant