mirror of
https://github.com/esiur/esiur-dotnet.git
synced 2026-10-24 03:50:57 +00:00
Port
This commit is contained in:
1 parent
53f9819d40
commit
2028db671f
19 files changed
+159
-45
No files matched your search
@@ -0,0 +1,22 @@
|
||||
using Esiur.Protocol;
|
||||
using Esiur.Resource;
|
||||
|
||||
namespace Esiur.Tests.Unit;
|
||||
|
||||
public sealed class EpPortTests
|
||||
{
|
||||
[Fact]
|
||||
public void ServerDoesNotAssignAProtocolPort()
|
||||
=> Assert.Equal(0, new EpServer().Port);
|
||||
|
||||
[Fact]
|
||||
public async Task ClientEndpointWithoutPortIsRejected()
|
||||
{
|
||||
var warehouse = new Warehouse();
|
||||
|
||||
var exception = await Assert.ThrowsAsync<FormatException>(async () =>
|
||||
await warehouse.Get<EpConnection>("ep://localhost/sys/resource"));
|
||||
|
||||
Assert.Contains("explicit port", exception.Message, StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user