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 <noreply@anthropic.com>main
parent
65fdb4d090
commit
8601c90552
|
|
@ -105,7 +105,7 @@ namespace MCPForUnityTests.Editor.Tools
|
||||||
public void TryResolve_PrefersPlayerAssemblies()
|
public void TryResolve_PrefersPlayerAssemblies()
|
||||||
{
|
{
|
||||||
// Test that custom user scripts (in Player assemblies) are found
|
// 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.IsTrue(result, "Should resolve user script from Player assembly");
|
||||||
Assert.IsNotNull(type, "Should return valid type");
|
Assert.IsNotNull(type, "Should return valid type");
|
||||||
|
|
@ -114,6 +114,10 @@ namespace MCPForUnityTests.Editor.Tools
|
||||||
string assemblyName = type.Assembly.GetName().Name;
|
string assemblyName = type.Assembly.GetName().Name;
|
||||||
Assert.That(assemblyName, Does.Not.Contain("Editor"),
|
Assert.That(assemblyName, Does.Not.Contain("Editor"),
|
||||||
"User script should come from Player assembly, not Editor assembly");
|
"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]
|
[Test]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue