Skip to content

Commit

Permalink
Fix some nullability warnings in tests (#4452)
Browse files Browse the repository at this point in the history
  • Loading branch information
Evangelink committed May 15, 2023
1 parent 42a89d2 commit 95b5000
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public void SocketClientStartShouldThrowIfServerIsNotListening()
[TestMethod]
public void SocketClientStopShouldRaiseClientDisconnectedEventOnClientDisconnection()
{
var waitEvent = SetupClientDisconnect(out ICommunicationChannel _);
var waitEvent = SetupClientDisconnect(out ICommunicationChannel? _);

// Close the communication from client side
_socketClient.Stop();
Expand All @@ -94,7 +94,7 @@ public void SocketClientStopShouldRaiseClientDisconnectedEventOnClientDisconnect
[TestMethod]
public void SocketClientShouldRaiseClientDisconnectedEventIfConnectionIsBroken()
{
var waitEvent = SetupClientDisconnect(out ICommunicationChannel _);
var waitEvent = SetupClientDisconnect(out ICommunicationChannel? _);

// Close the communication from server side
_tcpClient?.GetStream().Dispose();
Expand All @@ -106,7 +106,7 @@ public void SocketClientShouldRaiseClientDisconnectedEventIfConnectionIsBroken()
[TestMethod]
public void SocketClientStopShouldStopCommunication()
{
var waitEvent = SetupClientDisconnect(out ICommunicationChannel _);
var waitEvent = SetupClientDisconnect(out ICommunicationChannel? _);

// Close the communication from socket client side
_socketClient.Stop();
Expand Down Expand Up @@ -157,7 +157,7 @@ private ManualResetEvent SetupClientDisconnect(out ICommunicationChannel? channe
{
var waitEvent = new ManualResetEvent(false);
_socketClient.Disconnected += (s, e) => waitEvent.Set();
channel = SetupChannel(out ConnectedEventArgs _);
channel = SetupChannel(out ConnectedEventArgs? _);
channel!.MessageReceived += (sender, args) =>
{
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public void SocketServerShouldRaiseClientDisconnectedEventIfConnectionIsBroken()
[TestMethod]
public async Task SocketEndpointShouldInitializeChannelOnServerConnection()
{
var channel = SetupChannel(out ConnectedEventArgs _);
var channel = SetupChannel(out ConnectedEventArgs? _);

await channel!.Send(Dummydata);

Expand Down

0 comments on commit 95b5000

Please sign in to comment.