mirror of
https://github.com/AtomUI/AtomUI.git
synced 2026-10-21 16:36:27 +08:00
23 lines
741 B
C#
23 lines
741 B
C#
using AtomUI.Registration;
|
|
using Shouldly;
|
|
using Xunit;
|
|
|
|
namespace AtomUI.Core.Tests.Registration;
|
|
|
|
public sealed class ControlPackageRegistrationEntryAttributeTests
|
|
{
|
|
[Fact]
|
|
public void Attribute_Is_A_Single_Method_Level_Declaration()
|
|
{
|
|
typeof(ControlPackageRegistrationEntryAttribute).IsSealed.ShouldBeTrue();
|
|
|
|
var usage = typeof(ControlPackageRegistrationEntryAttribute)
|
|
.GetCustomAttributes(typeof(AttributeUsageAttribute), inherit: false)
|
|
.Cast<AttributeUsageAttribute>()
|
|
.ShouldHaveSingleItem();
|
|
usage.ValidOn.ShouldBe(AttributeTargets.Method);
|
|
usage.AllowMultiple.ShouldBeFalse();
|
|
usage.Inherited.ShouldBeFalse();
|
|
}
|
|
}
|