From 8601c90552b5e840551c559870774468f9f19c6f Mon Sep 17 00:00:00 2001 From: David Sarno Date: Wed, 3 Sep 2025 10:24:52 -0700 Subject: [PATCH] fix: Replace missing TicTacToe3D with existing CustomComponent in ComponentResolver test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The TryResolve_PrefersPlayerAssemblies test was failing in CI because it referenced TicTacToe3D.cs which exists only locally and is not committed to the repository. - Replace test reference from "TicTacToe3D" to "CustomComponent" - CustomComponent exists in Assets/Scripts/TestAsmdef/ and is tracked in git - CustomComponent is properly compiled into the TestAsmdef Player assembly - Add explicit assertion to verify resolution from correct TestAsmdef assembly - Test maintains same functionality: verifying ComponentResolver finds user scripts from Player assemblies 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .../Assets/Tests/EditMode/Tools/ComponentResolverTests.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/TestProjects/UnityMCPTests/Assets/Tests/EditMode/Tools/ComponentResolverTests.cs b/TestProjects/UnityMCPTests/Assets/Tests/EditMode/Tools/ComponentResolverTests.cs index d19afbb..9b24456 100644 --- a/TestProjects/UnityMCPTests/Assets/Tests/EditMode/Tools/ComponentResolverTests.cs +++ b/TestProjects/UnityMCPTests/Assets/Tests/EditMode/Tools/ComponentResolverTests.cs @@ -105,7 +105,7 @@ namespace MCPForUnityTests.Editor.Tools public void TryResolve_PrefersPlayerAssemblies() { // Test that custom user scripts (in Player assemblies) are found - bool result = ComponentResolver.TryResolve("TicTacToe3D", out Type type, out string error); + bool result = ComponentResolver.TryResolve("CustomComponent", out Type type, out string error); Assert.IsTrue(result, "Should resolve user script from Player assembly"); Assert.IsNotNull(type, "Should return valid type"); @@ -114,6 +114,10 @@ namespace MCPForUnityTests.Editor.Tools string assemblyName = type.Assembly.GetName().Name; Assert.That(assemblyName, Does.Not.Contain("Editor"), "User script should come from Player assembly, not Editor assembly"); + + // Verify it's from the TestAsmdef assembly (which is a Player assembly) + Assert.AreEqual("TestAsmdef", assemblyName, + "CustomComponent should be resolved from TestAsmdef assembly"); } [Test]