fix: preserve SDK 2.0 client value and lifetime contracts
This commit is contained in:
+6
-6
@@ -117,7 +117,7 @@ public class EndpointSelectorTests
|
||||
var best = EndpointSelector.SelectBest(endpoints, "opc.tcp://external-host:4840",
|
||||
MessageSecurityMode.Sign);
|
||||
|
||||
new Uri(best.EndpointUrl).Host.ShouldBe("external-host");
|
||||
new Uri(best.EndpointUrl.ShouldNotBeNull()).Host.ShouldBe("external-host");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -169,7 +169,7 @@ public class EndpointSelectorTests
|
||||
|
||||
var best = EndpointSelector.SelectBest(endpoints, "opc.tcp://localhost:4841", MessageSecurityMode.None);
|
||||
|
||||
var uri = new Uri(best.EndpointUrl);
|
||||
var uri = new Uri(best.EndpointUrl.ShouldNotBeNull());
|
||||
uri.Host.ShouldBe("localhost");
|
||||
uri.Port.ShouldBe(4841);
|
||||
uri.AbsolutePath.ShouldBe("/OtOpcUa");
|
||||
@@ -183,8 +183,8 @@ public class EndpointSelectorTests
|
||||
|
||||
var best = EndpointSelector.SelectBest(endpoints, "opc.tcp://localhost:4841", MessageSecurityMode.None);
|
||||
|
||||
new Uri(best.EndpointUrl).Host.ShouldBe("internal-host");
|
||||
new Uri(best.EndpointUrl).Port.ShouldBe(4843);
|
||||
new Uri(best.EndpointUrl.ShouldNotBeNull()).Host.ShouldBe("internal-host");
|
||||
new Uri(best.EndpointUrl.ShouldNotBeNull()).Port.ShouldBe(4843);
|
||||
}
|
||||
|
||||
/// <summary>Identical host, port and scheme: nothing to rewrite.</summary>
|
||||
@@ -206,7 +206,7 @@ public class EndpointSelectorTests
|
||||
|
||||
var best = EndpointSelector.SelectBest(endpoints, "opc.tcp://localhost", MessageSecurityMode.None);
|
||||
|
||||
var uri = new Uri(best.EndpointUrl);
|
||||
var uri = new Uri(best.EndpointUrl.ShouldNotBeNull());
|
||||
uri.Host.ShouldBe("localhost");
|
||||
uri.Port.ShouldBe(4840);
|
||||
}
|
||||
@@ -219,7 +219,7 @@ public class EndpointSelectorTests
|
||||
|
||||
var best = EndpointSelector.SelectBest(endpoints, "opc.tcp://[::1]:4841", MessageSecurityMode.None);
|
||||
|
||||
var uri = new Uri(best.EndpointUrl);
|
||||
var uri = new Uri(best.EndpointUrl.ShouldNotBeNull());
|
||||
uri.Host.ShouldBe("[::1]");
|
||||
uri.Port.ShouldBe(4841);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user