diff --git a/test/WebSocketManager.Tests/WebSocketConnectionManagerTests.cs b/test/WebSocketManager.Tests/WebSocketConnectionManagerTests.cs index 66c775b..eae64dd 100644 --- a/test/WebSocketManager.Tests/WebSocketConnectionManagerTests.cs +++ b/test/WebSocketManager.Tests/WebSocketConnectionManagerTests.cs @@ -43,7 +43,7 @@ public class GetAll : WebSocketConnectionManagerTests [Fact] public void WhenEmpty_ShouldReturnZero() { - Assert.Equal(0, _manager.GetAll().Count); + Assert.Empty(_manager.GetAll()); } [Fact] @@ -51,7 +51,7 @@ public void WhenOneSocket_ShouldReturnOne() { _manager.AddSocket(new FakeSocket()); - Assert.Equal(1, _manager.GetAll().Count); + Assert.Single(_manager.GetAll()); } } @@ -73,7 +73,7 @@ public void WhenOneSocketInGroup_ShouldReturnOne() var socketID = _manager.GetId(socket); _manager.AddToGroup(socketID, GroupName); - Assert.Equal(1, _manager.GetAllFromGroup(GroupName).Count); + Assert.Single(_manager.GetAllFromGroup(GroupName)); } } @@ -114,7 +114,7 @@ public void WhenNull_ShouldNotNotContainSocket() { _manager.AddSocket(null); - Assert.Equal(0, _manager.GetAll().Count); + Assert.Empty(_manager.GetAll()); } [Fact] @@ -122,7 +122,7 @@ public void WhenInstance_ShouldContainSocket() { _manager.AddSocket(new FakeSocket()); - Assert.Equal(1, _manager.GetAll().Count); + Assert.Single(_manager.GetAll()); } } @@ -149,4 +149,4 @@ public void WhenRemoveNonExisting_ShouldNotThrowException() } } } -} \ No newline at end of file +}