adds comments, OOP incapsulation and publish package to nuget

This commit is contained in:
Dmitri Shimanski
2025-03-29 02:54:54 +03:00
parent 2ba9667a01
commit 1b1eb17bee
11 changed files with 103 additions and 19 deletions

View File

@@ -11,6 +11,7 @@ using Moq;
using Xunit;
using yawaflua.WebSockets.Attributes;
using yawaflua.WebSockets.Models.Abstracts;
using yawaflua.WebSockets.Models.Interfaces;
using Assert = Xunit.Assert;
using WebSocket = yawaflua.WebSockets.Core.WebSocket;
using WebSocketManager = Microsoft.AspNetCore.Http.WebSocketManager;
@@ -35,10 +36,10 @@ public class WebSocketRouterTests
public class TestHandler : WebSocketController
{
[yawaflua.WebSockets.Attributes.WebSocket("/static")]
public static Task StaticHandler(WebSocket ws, HttpContext context) => Task.CompletedTask;
public static Task StaticHandler(IWebSocket ws, HttpContext context) => Task.CompletedTask;
[yawaflua.WebSockets.Attributes.WebSocket("/instance")]
public Task InstanceHandler(WebSocket ws, HttpContext context) => Task.CompletedTask;
public Task InstanceHandler(IWebSocket ws, HttpContext context) => Task.CompletedTask;
}
[Fact]