Skip to content

Commit 8601c90

Browse files
dsarnoclaude
andcommitted
fix: Replace missing TicTacToe3D with existing CustomComponent in ComponentResolver test
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 <[email protected]>
1 parent 65fdb4d commit 8601c90

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

TestProjects/UnityMCPTests/Assets/Tests/EditMode/Tools/ComponentResolverTests.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public void TryResolve_CachesResolvedTypes()
105105
public void TryResolve_PrefersPlayerAssemblies()
106106
{
107107
// Test that custom user scripts (in Player assemblies) are found
108-
bool result = ComponentResolver.TryResolve("TicTacToe3D", out Type type, out string error);
108+
bool result = ComponentResolver.TryResolve("CustomComponent", out Type type, out string error);
109109

110110
Assert.IsTrue(result, "Should resolve user script from Player assembly");
111111
Assert.IsNotNull(type, "Should return valid type");
@@ -114,6 +114,10 @@ public void TryResolve_PrefersPlayerAssemblies()
114114
string assemblyName = type.Assembly.GetName().Name;
115115
Assert.That(assemblyName, Does.Not.Contain("Editor"),
116116
"User script should come from Player assembly, not Editor assembly");
117+
118+
// Verify it's from the TestAsmdef assembly (which is a Player assembly)
119+
Assert.AreEqual("TestAsmdef", assemblyName,
120+
"CustomComponent should be resolved from TestAsmdef assembly");
117121
}
118122

119123
[Test]

0 commit comments

Comments
 (0)