This commit is contained in:
ahmed committed 2026-08-04 06:17:32 +03:00
1 parent 53f9819d40
commit 2028db671f
19 files changed
+159 -45

No files matched your search

+22
View File
@@ -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);
}
}