fix(transport-ui): use DataConnection ctor in CountSecrets tests (M8 build fix)
This commit is contained in:
+3
-3
@@ -447,7 +447,7 @@ public class TransportExportPageTests : BunitContext
|
|||||||
public void CountSecrets_includes_data_connection_primary_and_backup_configurations()
|
public void CountSecrets_includes_data_connection_primary_and_backup_configurations()
|
||||||
{
|
{
|
||||||
// One data connection with both fields populated — expect 2 secrets counted.
|
// One data connection with both fields populated — expect 2 secrets counted.
|
||||||
var dcBoth = new DataConnection { Id = 1, SiteId = 10, Name = "PlcA", Protocol = "OpcUa",
|
var dcBoth = new DataConnection("PlcA", "OpcUa", 10) { Id = 1,
|
||||||
PrimaryConfiguration = "{\"endpoint\":\"opc.tcp://plc-a:4840\"}", BackupConfiguration = "{\"endpoint\":\"opc.tcp://plc-a-backup:4840\"}" };
|
PrimaryConfiguration = "{\"endpoint\":\"opc.tcp://plc-a:4840\"}", BackupConfiguration = "{\"endpoint\":\"opc.tcp://plc-a-backup:4840\"}" };
|
||||||
|
|
||||||
var resolved = new ResolvedExport(
|
var resolved = new ResolvedExport(
|
||||||
@@ -472,11 +472,11 @@ public class TransportExportPageTests : BunitContext
|
|||||||
public void CountSecrets_counts_only_non_empty_data_connection_configurations()
|
public void CountSecrets_counts_only_non_empty_data_connection_configurations()
|
||||||
{
|
{
|
||||||
// Primary only — backup is null.
|
// Primary only — backup is null.
|
||||||
var dcPrimaryOnly = new DataConnection { Id = 2, SiteId = 10, Name = "PlcB", Protocol = "OpcUa",
|
var dcPrimaryOnly = new DataConnection("PlcB", "OpcUa", 10) { Id = 2,
|
||||||
PrimaryConfiguration = "{\"endpoint\":\"opc.tcp://plc-b:4840\"}", BackupConfiguration = null };
|
PrimaryConfiguration = "{\"endpoint\":\"opc.tcp://plc-b:4840\"}", BackupConfiguration = null };
|
||||||
|
|
||||||
// Neither field set — should not contribute.
|
// Neither field set — should not contribute.
|
||||||
var dcEmpty = new DataConnection { Id = 3, SiteId = 10, Name = "PlcC", Protocol = "OpcUa",
|
var dcEmpty = new DataConnection("PlcC", "OpcUa", 10) { Id = 3,
|
||||||
PrimaryConfiguration = null, BackupConfiguration = null };
|
PrimaryConfiguration = null, BackupConfiguration = null };
|
||||||
|
|
||||||
var resolved = new ResolvedExport(
|
var resolved = new ResolvedExport(
|
||||||
|
|||||||
Reference in New Issue
Block a user