Skip to content

Commit 1cc4ffc

Browse files
authored
Merge pull request #259 from dsarno/fix/component-resolver-test
fix: Replace missing TicTacToe3D with existing CustomComponent in Com…
2 parents 65fdb4d + 8601c90 commit 1cc4ffc

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)