The aahClientManaged SDK is now isolated in ZB.MOM.WW.LmxOpcUa.Historian.Aveva and loaded via HistorianPluginLoader from a Historian/ subfolder only when enabled, removing the SDK from Host's compile-time and deploy-time surface. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
60 lines
1.9 KiB
C#
60 lines
1.9 KiB
C#
using Opc.Ua;
|
|
using Shouldly;
|
|
using Xunit;
|
|
using ZB.MOM.WW.LmxOpcUa.Host.Historian;
|
|
|
|
namespace ZB.MOM.WW.LmxOpcUa.Tests.Historian
|
|
{
|
|
public class HistorianAggregateMapTests
|
|
{
|
|
[Fact]
|
|
public void MapAggregateToColumn_Average_ReturnsAverage()
|
|
{
|
|
HistorianAggregateMap.MapAggregateToColumn(ObjectIds.AggregateFunction_Average).ShouldBe("Average");
|
|
}
|
|
|
|
[Fact]
|
|
public void MapAggregateToColumn_Minimum_ReturnsMinimum()
|
|
{
|
|
HistorianAggregateMap.MapAggregateToColumn(ObjectIds.AggregateFunction_Minimum).ShouldBe("Minimum");
|
|
}
|
|
|
|
[Fact]
|
|
public void MapAggregateToColumn_Maximum_ReturnsMaximum()
|
|
{
|
|
HistorianAggregateMap.MapAggregateToColumn(ObjectIds.AggregateFunction_Maximum).ShouldBe("Maximum");
|
|
}
|
|
|
|
[Fact]
|
|
public void MapAggregateToColumn_Count_ReturnsValueCount()
|
|
{
|
|
HistorianAggregateMap.MapAggregateToColumn(ObjectIds.AggregateFunction_Count).ShouldBe("ValueCount");
|
|
}
|
|
|
|
[Fact]
|
|
public void MapAggregateToColumn_Start_ReturnsFirst()
|
|
{
|
|
HistorianAggregateMap.MapAggregateToColumn(ObjectIds.AggregateFunction_Start).ShouldBe("First");
|
|
}
|
|
|
|
[Fact]
|
|
public void MapAggregateToColumn_End_ReturnsLast()
|
|
{
|
|
HistorianAggregateMap.MapAggregateToColumn(ObjectIds.AggregateFunction_End).ShouldBe("Last");
|
|
}
|
|
|
|
[Fact]
|
|
public void MapAggregateToColumn_StdDev_ReturnsStdDev()
|
|
{
|
|
HistorianAggregateMap.MapAggregateToColumn(ObjectIds.AggregateFunction_StandardDeviationPopulation)
|
|
.ShouldBe("StdDev");
|
|
}
|
|
|
|
[Fact]
|
|
public void MapAggregateToColumn_Unsupported_ReturnsNull()
|
|
{
|
|
HistorianAggregateMap.MapAggregateToColumn(new NodeId(99999)).ShouldBeNull();
|
|
}
|
|
}
|
|
}
|