Linter/formatter pass across the full codebase. Restores required partial keyword on AXAML code-behind classes that the formatter incorrectly removed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
63 lines
2.1 KiB
C#
63 lines
2.1 KiB
C#
using Shouldly;
|
|
using Xunit;
|
|
using ZB.MOM.WW.LmxOpcUa.Host.Domain;
|
|
|
|
namespace ZB.MOM.WW.LmxOpcUa.Tests.Domain
|
|
{
|
|
/// <summary>
|
|
/// Verifies default and extended-field behavior for Galaxy attribute metadata objects.
|
|
/// </summary>
|
|
public class GalaxyAttributeInfoTests
|
|
{
|
|
/// <summary>
|
|
/// Confirms that a default attribute metadata object starts with empty strings for its text fields.
|
|
/// </summary>
|
|
[Fact]
|
|
public void DefaultValues_AreEmpty()
|
|
{
|
|
var info = new GalaxyAttributeInfo();
|
|
info.PrimitiveName.ShouldBe("");
|
|
info.AttributeSource.ShouldBe("");
|
|
info.TagName.ShouldBe("");
|
|
info.AttributeName.ShouldBe("");
|
|
info.FullTagReference.ShouldBe("");
|
|
info.DataTypeName.ShouldBe("");
|
|
info.SecurityClassification.ShouldBe(1);
|
|
info.IsHistorized.ShouldBeFalse();
|
|
info.IsAlarm.ShouldBeFalse();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Confirms that primitive-name and attribute-source fields can be populated for extended metadata rows.
|
|
/// </summary>
|
|
[Fact]
|
|
public void ExtendedFields_CanBeSet()
|
|
{
|
|
var info = new GalaxyAttributeInfo
|
|
{
|
|
PrimitiveName = "UDO",
|
|
AttributeSource = "primitive"
|
|
};
|
|
info.PrimitiveName.ShouldBe("UDO");
|
|
info.AttributeSource.ShouldBe("primitive");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Confirms that standard attribute rows leave the extended metadata fields empty.
|
|
/// </summary>
|
|
[Fact]
|
|
public void StandardAttributes_HaveEmptyExtendedFields()
|
|
{
|
|
var info = new GalaxyAttributeInfo
|
|
{
|
|
GobjectId = 1,
|
|
TagName = "TestObj",
|
|
AttributeName = "MachineID",
|
|
FullTagReference = "TestObj.MachineID",
|
|
MxDataType = 5
|
|
};
|
|
info.PrimitiveName.ShouldBe("");
|
|
info.AttributeSource.ShouldBe("");
|
|
}
|
|
}
|
|
} |