ModernUO/Projects/UOContent.Tests/Tests/Commands/Objects/ObjectDiscoveryTests.cs
Kamron Batman ee0c8c256d
feat(objects): DiscoverConstructibleTypes — all constructible Item/Mobile types
Implement DiscoverConstructibleTypes() method with HasConstructibleCtor helper
to enumerate every non-abstract Item/Mobile subclass in AssemblyHandler.Assemblies
that has at least one [Constructible] ctor.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-19 12:38:03 -07:00

19 lines
527 B
C#

using Server.Commands;
using Server.Items;
using Xunit;
namespace UOContent.Tests.Commands.Objects;
[Collection("Sequential UOContent Tests")]
public class ObjectDiscoveryTests
{
[Fact]
public void Discover_includes_concrete_constructibles_and_excludes_abstract()
{
var types = ObjectIntrospection.DiscoverConstructibleTypes();
Assert.Contains(typeof(Katana), types);
Assert.Contains(typeof(Runebook), types);
Assert.DoesNotContain(typeof(BaseWeapon), types); // abstract
}
}