using System.Collections.Generic;
using ZB.MOM.WW.OtOpcUa.Host.Domain;
namespace ZB.MOM.WW.OtOpcUa.Tests.Helpers
{
///
/// Reusable test data matching the Galaxy hierarchy from gr/layout.md.
///
public static class TestData
{
///
/// Creates the standard Galaxy hierarchy used by integration and wiring tests.
///
/// The standard hierarchy rows for the fake repository.
public static List CreateStandardHierarchy()
{
return new List
{
new()
{
GobjectId = 1, TagName = "DEV", ContainedName = "DEV", BrowseName = "DEV", ParentGobjectId = 0,
IsArea = true
},
new()
{
GobjectId = 2, TagName = "TestArea", ContainedName = "TestArea", BrowseName = "TestArea",
ParentGobjectId = 1, IsArea = true
},
new()
{
GobjectId = 3, TagName = "TestMachine_001", ContainedName = "TestMachine_001",
BrowseName = "TestMachine_001", ParentGobjectId = 2, IsArea = false
},
new()
{
GobjectId = 4, TagName = "DelmiaReceiver_001", ContainedName = "DelmiaReceiver",
BrowseName = "DelmiaReceiver", ParentGobjectId = 3, IsArea = false
},
new()
{
GobjectId = 5, TagName = "MESReceiver_001", ContainedName = "MESReceiver",
BrowseName = "MESReceiver", ParentGobjectId = 3, IsArea = false
}
};
}
///
/// Creates the standard attribute set used by integration and wiring tests.
///
/// The standard attribute rows for the fake repository.
public static List CreateStandardAttributes()
{
return new List
{
new()
{
GobjectId = 3, TagName = "TestMachine_001", AttributeName = "MachineID",
FullTagReference = "TestMachine_001.MachineID", MxDataType = 5, IsArray = false
},
new()
{
GobjectId = 3, TagName = "TestMachine_001", AttributeName = "MachineCode",
FullTagReference = "TestMachine_001.MachineCode", MxDataType = 5, IsArray = false
},
new()
{
GobjectId = 4, TagName = "DelmiaReceiver_001", AttributeName = "DownloadPath",
FullTagReference = "DelmiaReceiver_001.DownloadPath", MxDataType = 5, IsArray = false
},
new()
{
GobjectId = 4, TagName = "DelmiaReceiver_001", AttributeName = "JobStepNumber",
FullTagReference = "DelmiaReceiver_001.JobStepNumber", MxDataType = 2, IsArray = false
},
new()
{
GobjectId = 5, TagName = "MESReceiver_001", AttributeName = "MoveInBatchID",
FullTagReference = "MESReceiver_001.MoveInBatchID", MxDataType = 5, IsArray = false
},
new()
{
GobjectId = 5, TagName = "MESReceiver_001", AttributeName = "MoveInPartNumbers",
FullTagReference = "MESReceiver_001.MoveInPartNumbers[]", MxDataType = 5, IsArray = true,
ArrayDimension = 50
}
};
}
///
/// Creates a minimal hierarchy containing a single object for focused unit tests.
///
/// A minimal hierarchy row set.
public static List CreateMinimalHierarchy()
{
return new List
{
new()
{
GobjectId = 1, TagName = "TestObj", BrowseName = "TestObj", ParentGobjectId = 0, IsArea = false
}
};
}
///
/// Creates a minimal attribute set containing a single scalar attribute for focused unit tests.
///
/// A minimal attribute row set.
public static List CreateMinimalAttributes()
{
return new List
{
new()
{
GobjectId = 1, TagName = "TestObj", AttributeName = "TestAttr",
FullTagReference = "TestObj.TestAttr", MxDataType = 5, IsArray = false
}
};
}
}
}