first commit
This commit is contained in:
@@ -0,0 +1,91 @@
|
||||
using System;
|
||||
using FluentAssertions;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using NitroxClient.Communication.Abstract;
|
||||
using NSubstitute;
|
||||
|
||||
namespace NitroxClient.Communication.MultiplayerSession.ConnectionState
|
||||
{
|
||||
[TestClass]
|
||||
public class SessionJoinedStateTests
|
||||
{
|
||||
[TestMethod]
|
||||
public void NegotiateShouldThrowInvalidOperationException()
|
||||
{
|
||||
// Arrange
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
SessionJoined connectionState = new SessionJoined();
|
||||
|
||||
// Act
|
||||
Action action = () => connectionState.NegotiateReservationAsync(connectionContext);
|
||||
|
||||
// Assert
|
||||
action.Should().Throw<InvalidOperationException>();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void JoinSessionShouldThrowInvalidOperationExcepion()
|
||||
{
|
||||
// Arrange
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
SessionJoined connectionState = new SessionJoined();
|
||||
|
||||
// Act
|
||||
Action action = () => connectionState.JoinSession(connectionContext);
|
||||
|
||||
// Assert
|
||||
action.Should().Throw<InvalidOperationException>();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void DisconnectShouldStopTheClient()
|
||||
{
|
||||
// Arrange
|
||||
IClient serverClient = Substitute.For<IClient>();
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
connectionContext.Client.Returns(serverClient);
|
||||
|
||||
SessionJoined connectionState = new SessionJoined();
|
||||
|
||||
// Act
|
||||
connectionState.Disconnect(connectionContext);
|
||||
|
||||
// Assert
|
||||
serverClient.Received().Stop();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void DisconnectShouldResetTheConnectionContext()
|
||||
{
|
||||
// Arrange
|
||||
IClient serverClient = Substitute.For<IClient>();
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
connectionContext.Client.Returns(serverClient);
|
||||
|
||||
SessionJoined connectionState = new SessionJoined();
|
||||
|
||||
// Act
|
||||
connectionState.Disconnect(connectionContext);
|
||||
|
||||
// Assert
|
||||
connectionContext.Received().ClearSessionState();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void DisconnectShouldTransitionToDisconnectedState()
|
||||
{
|
||||
// Arrange
|
||||
IClient serverClient = Substitute.For<IClient>();
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
connectionContext.Client.Returns(serverClient);
|
||||
|
||||
SessionJoined connection = new SessionJoined();
|
||||
|
||||
// Act
|
||||
connection.Disconnect(connectionContext);
|
||||
|
||||
// Assert
|
||||
connectionContext.Received().UpdateConnectionState(Arg.Any<Disconnected>());
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,91 @@
|
||||
using System;
|
||||
using FluentAssertions;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using NitroxClient.Communication.Abstract;
|
||||
using NSubstitute;
|
||||
|
||||
namespace NitroxClient.Communication.MultiplayerSession.ConnectionState
|
||||
{
|
||||
[TestClass]
|
||||
public class SessionReservationRejectedStateTests
|
||||
{
|
||||
[TestMethod]
|
||||
public void NegotiateShouldThrowInvalidOperationException()
|
||||
{
|
||||
// Arrange
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
SessionReservationRejected connectionState = new SessionReservationRejected();
|
||||
|
||||
// Act
|
||||
Action action = () => connectionState.NegotiateReservationAsync(connectionContext);
|
||||
|
||||
// Assert
|
||||
action.Should().Throw<InvalidOperationException>();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void JoinSessionShouldThrowInvalidOperationExcepion()
|
||||
{
|
||||
// Arrange
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
SessionReservationRejected connectionState = new SessionReservationRejected();
|
||||
|
||||
// Act
|
||||
Action action = () => connectionState.JoinSession(connectionContext);
|
||||
|
||||
// Assert
|
||||
action.Should().Throw<InvalidOperationException>();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void DisconnectShouldStopTheClient()
|
||||
{
|
||||
// Arrange
|
||||
IClient serverClient = Substitute.For<IClient>();
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
connectionContext.Client.Returns(serverClient);
|
||||
|
||||
SessionReservationRejected connectionState = new SessionReservationRejected();
|
||||
|
||||
// Act
|
||||
connectionState.Disconnect(connectionContext);
|
||||
|
||||
// Assert
|
||||
serverClient.Received().Stop();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void DisconnectShouldResetTheConnectionContext()
|
||||
{
|
||||
// Arrange
|
||||
IClient serverClient = Substitute.For<IClient>();
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
connectionContext.Client.Returns(serverClient);
|
||||
|
||||
SessionReservationRejected connectionState = new SessionReservationRejected();
|
||||
|
||||
// Act
|
||||
connectionState.Disconnect(connectionContext);
|
||||
|
||||
// Assert
|
||||
connectionContext.Received().ClearSessionState();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void DisconnectShouldTransitionToDisconnectedState()
|
||||
{
|
||||
// Arrange
|
||||
IClient serverClient = Substitute.For<IClient>();
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
connectionContext.Client.Returns(serverClient);
|
||||
|
||||
SessionReservationRejected connection = new SessionReservationRejected();
|
||||
|
||||
// Act
|
||||
connection.Disconnect(connectionContext);
|
||||
|
||||
// Assert
|
||||
connectionContext.Received().UpdateConnectionState(Arg.Any<Disconnected>());
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,129 @@
|
||||
using System;
|
||||
using FluentAssertions;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Nitrox.Test.Client.Communication.MultiplayerSession;
|
||||
using NitroxClient.Communication.Abstract;
|
||||
using NitroxModel.Packets;
|
||||
using NSubstitute;
|
||||
|
||||
namespace NitroxClient.Communication.MultiplayerSession.ConnectionState
|
||||
{
|
||||
[TestClass]
|
||||
public class SessionReservedStateTests
|
||||
{
|
||||
[TestMethod]
|
||||
public void NegotiateShouldThrowInvalidOperationException()
|
||||
{
|
||||
// Arrange
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
SessionReserved connectionState = new SessionReserved();
|
||||
|
||||
// Act
|
||||
Action action = () => connectionState.NegotiateReservationAsync(connectionContext);
|
||||
|
||||
// Assert
|
||||
action.Should().Throw<InvalidOperationException>();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void JoinSessionShouldSendPlayerJoiningMultiplayerSessionPacket()
|
||||
{
|
||||
// Arrange
|
||||
MultiplayerSessionReservation successfulReservation = new MultiplayerSessionReservation(
|
||||
TestConstants.TEST_CORRELATION_ID,
|
||||
TestConstants.TEST_PLAYER_ID,
|
||||
TestConstants.TEST_RESERVATION_KEY);
|
||||
|
||||
IClient client = Substitute.For<IClient>();
|
||||
client.IsConnected.Returns(true);
|
||||
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
connectionContext.Reservation.Returns(successfulReservation);
|
||||
connectionContext.Client.Returns(client);
|
||||
|
||||
SessionReserved connectionState = new SessionReserved();
|
||||
|
||||
// Act
|
||||
connectionState.JoinSession(connectionContext);
|
||||
|
||||
// Assert
|
||||
client.Received().Send(Arg.Any<PlayerJoiningMultiplayerSession>());
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void JoinSessionShouldTransitionToSessionJoinedState()
|
||||
{
|
||||
// Arrange
|
||||
MultiplayerSessionReservation successfulReservation = new MultiplayerSessionReservation(
|
||||
TestConstants.TEST_CORRELATION_ID,
|
||||
TestConstants.TEST_PLAYER_ID,
|
||||
TestConstants.TEST_RESERVATION_KEY);
|
||||
|
||||
IClient serverClient = Substitute.For<IClient>();
|
||||
serverClient.IsConnected.Returns(true);
|
||||
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
connectionContext.Reservation.Returns(successfulReservation);
|
||||
connectionContext.Client.Returns(serverClient);
|
||||
|
||||
SessionReserved connection = new SessionReserved();
|
||||
|
||||
// Act
|
||||
connection.JoinSession(connectionContext);
|
||||
|
||||
// Assert
|
||||
connectionContext.Received().UpdateConnectionState(Arg.Any<SessionJoined>());
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void DisconnectShouldStopTheClient()
|
||||
{
|
||||
// Arrange
|
||||
IClient serverClient = Substitute.For<IClient>();
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
connectionContext.Client.Returns(serverClient);
|
||||
|
||||
SessionReserved connectionState = new SessionReserved();
|
||||
|
||||
// Act
|
||||
connectionState.Disconnect(connectionContext);
|
||||
|
||||
// Assert
|
||||
serverClient.Received().Stop();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void DisconnectShouldResetTheConnectionContext()
|
||||
{
|
||||
// Arrange
|
||||
IClient serverClient = Substitute.For<IClient>();
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
connectionContext.Client.Returns(serverClient);
|
||||
|
||||
SessionReserved connectionState = new SessionReserved();
|
||||
|
||||
// Act
|
||||
connectionState.Disconnect(connectionContext);
|
||||
|
||||
// Assert
|
||||
connectionContext.Received().ClearSessionState();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void DisconnectShouldTransitionToDisconnectedState()
|
||||
{
|
||||
// Arrange
|
||||
IClient serverClient = Substitute.For<IClient>();
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
connectionContext.Client.Returns(serverClient);
|
||||
|
||||
SessionReserved connection = new SessionReserved();
|
||||
|
||||
// Act
|
||||
connection.Disconnect(connectionContext);
|
||||
|
||||
// Assert
|
||||
connectionContext.Received().UpdateConnectionState(Arg.Any<Disconnected>());
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,162 @@
|
||||
using System;
|
||||
using FluentAssertions;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Nitrox.Test.Client.Communication.MultiplayerSession;
|
||||
using NitroxClient.Communication.Abstract;
|
||||
using NitroxModel.MultiplayerSession;
|
||||
using NitroxModel.Packets;
|
||||
using NSubstitute;
|
||||
|
||||
namespace NitroxClient.Communication.MultiplayerSession.ConnectionState
|
||||
{
|
||||
[TestClass]
|
||||
public class AwaitingReservationCredentialsStateTests
|
||||
{
|
||||
[TestMethod]
|
||||
public void NegotiateShouldSendServerAuthorityReservationRequest()
|
||||
{
|
||||
// Arrange
|
||||
IClient serverClient = Substitute.For<IClient>();
|
||||
serverClient.IsConnected.Returns(true);
|
||||
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
connectionContext.Client.Returns(serverClient);
|
||||
connectionContext.PlayerSettings.Returns(TestConstants.TEST_PLAYER_SETTINGS);
|
||||
connectionContext.AuthenticationContext.Returns(TestConstants.TEST_AUTHENTICATION_CONTEXT);
|
||||
|
||||
AwaitingReservationCredentials connectionState = new AwaitingReservationCredentials();
|
||||
|
||||
// Act
|
||||
connectionState.NegotiateReservationAsync(connectionContext);
|
||||
|
||||
// Assert
|
||||
serverClient.Received().Send(Arg.Any<MultiplayerSessionReservationRequest>());
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void NegotiateShouldTransitionToAwaitingSessionReservationState()
|
||||
{
|
||||
// Arrange
|
||||
IClient serverClient = Substitute.For<IClient>();
|
||||
serverClient.IsConnected.Returns(true);
|
||||
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
connectionContext.Client.Returns(serverClient);
|
||||
connectionContext.PlayerSettings.Returns(TestConstants.TEST_PLAYER_SETTINGS);
|
||||
connectionContext.AuthenticationContext.Returns(TestConstants.TEST_AUTHENTICATION_CONTEXT);
|
||||
|
||||
AwaitingReservationCredentials connectionState = new AwaitingReservationCredentials();
|
||||
|
||||
// Act
|
||||
connectionState.NegotiateReservationAsync(connectionContext);
|
||||
|
||||
// Assert
|
||||
connectionContext.Received().UpdateConnectionState(Arg.Any<AwaitingSessionReservation>());
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void NegotiateShouldThrowInvalidOperationExceptionWhenPlayerSettingsIsNull()
|
||||
{
|
||||
// Arrange
|
||||
IClient serverClient = Substitute.For<IClient>();
|
||||
serverClient.IsConnected.Returns(true);
|
||||
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
connectionContext.PlayerSettings.Returns((PlayerSettings)null);
|
||||
connectionContext.AuthenticationContext.Returns(TestConstants.TEST_AUTHENTICATION_CONTEXT);
|
||||
|
||||
AwaitingReservationCredentials connectionState = new AwaitingReservationCredentials();
|
||||
|
||||
// Act
|
||||
Action action = () => connectionState.NegotiateReservationAsync(connectionContext);
|
||||
|
||||
// Assert
|
||||
action.Should().Throw<InvalidOperationException>();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void NegotiateShouldThrowInvalidOperationExceptionWhenAuthenticationContextIsNull()
|
||||
{
|
||||
// Arrange
|
||||
IClient serverClient = Substitute.For<IClient>();
|
||||
serverClient.IsConnected.Returns(true);
|
||||
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
connectionContext.SessionPolicy.Returns(TestConstants.TEST_SESSION_POLICY);
|
||||
connectionContext.AuthenticationContext.Returns((AuthenticationContext)null);
|
||||
|
||||
AwaitingReservationCredentials connectionState = new AwaitingReservationCredentials();
|
||||
|
||||
// Act
|
||||
Action action = () => connectionState.NegotiateReservationAsync(connectionContext);
|
||||
|
||||
// Assert
|
||||
action.Should().Throw<InvalidOperationException>();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void JoinSessionShouldThrowInvalidOperationException()
|
||||
{
|
||||
// Arrange
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
AwaitingReservationCredentials connectionState = new AwaitingReservationCredentials();
|
||||
|
||||
// Act
|
||||
Action action = () => connectionState.JoinSession(connectionContext);
|
||||
|
||||
// Assert
|
||||
action.Should().Throw<InvalidOperationException>();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void DisconnectShouldStopTheClient()
|
||||
{
|
||||
// Arrange
|
||||
IClient serverClient = Substitute.For<IClient>();
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
connectionContext.Client.Returns(serverClient);
|
||||
|
||||
AwaitingReservationCredentials connectionState = new AwaitingReservationCredentials();
|
||||
|
||||
// Act
|
||||
connectionState.Disconnect(connectionContext);
|
||||
|
||||
// Assert
|
||||
serverClient.Received().Stop();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void DisconnectShouldResetTheConnectionContext()
|
||||
{
|
||||
// Arrange
|
||||
IClient serverClient = Substitute.For<IClient>();
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
connectionContext.Client.Returns(serverClient);
|
||||
|
||||
AwaitingReservationCredentials connectionState = new AwaitingReservationCredentials();
|
||||
|
||||
// Act
|
||||
connectionState.Disconnect(connectionContext);
|
||||
|
||||
// Assert
|
||||
connectionContext.Received().ClearSessionState();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void DisconnectShouldTransitionToDisconnectedState()
|
||||
{
|
||||
// Arrange
|
||||
IClient serverClient = Substitute.For<IClient>();
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
connectionContext.Client.Returns(serverClient);
|
||||
|
||||
AwaitingReservationCredentials connectionState = new AwaitingReservationCredentials();
|
||||
|
||||
// Act
|
||||
connectionState.Disconnect(connectionContext);
|
||||
|
||||
// Assert
|
||||
connectionContext.Received().UpdateConnectionState(Arg.Any<Disconnected>());
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,156 @@
|
||||
using System;
|
||||
using FluentAssertions;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Nitrox.Test.Client.Communication.MultiplayerSession;
|
||||
using NitroxClient.Communication.Abstract;
|
||||
using NitroxModel.Packets;
|
||||
using NitroxModel.Packets.Exceptions;
|
||||
using NSubstitute;
|
||||
|
||||
namespace NitroxClient.Communication.MultiplayerSession.ConnectionState
|
||||
{
|
||||
[TestClass]
|
||||
public class AwaitingSessionReservationStateTests
|
||||
{
|
||||
[TestMethod]
|
||||
public void NegotiateShouldTransitionToSessionRevervedAfterReceivingSuccessfulReservation()
|
||||
{
|
||||
// Arrange
|
||||
MultiplayerSessionReservation successfulReservation = new MultiplayerSessionReservation(
|
||||
TestConstants.TEST_CORRELATION_ID,
|
||||
TestConstants.TEST_PLAYER_ID,
|
||||
TestConstants.TEST_RESERVATION_KEY);
|
||||
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
connectionContext.Reservation.Returns(successfulReservation);
|
||||
|
||||
AwaitingSessionReservation connectionState = new AwaitingSessionReservation(TestConstants.TEST_CORRELATION_ID);
|
||||
|
||||
// Act
|
||||
connectionState.NegotiateReservationAsync(connectionContext);
|
||||
|
||||
// Assert
|
||||
connectionContext.Received().UpdateConnectionState(Arg.Any<SessionReserved>());
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void NegotiateShouldThrowUncorrelatedPacketExceptionWhenTheReservationHasTheWrongCorrelationId()
|
||||
{
|
||||
// Arrange
|
||||
MultiplayerSessionReservation successfulReservation = new MultiplayerSessionReservation(
|
||||
"wrong",
|
||||
TestConstants.TEST_PLAYER_ID,
|
||||
TestConstants.TEST_RESERVATION_KEY);
|
||||
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
connectionContext.Reservation.Returns(successfulReservation);
|
||||
|
||||
AwaitingSessionReservation connectionState = new AwaitingSessionReservation(TestConstants.TEST_CORRELATION_ID);
|
||||
|
||||
// Act
|
||||
Action action = () => connectionState.NegotiateReservationAsync(connectionContext);
|
||||
|
||||
// Assert
|
||||
action.Should().Throw<UncorrelatedPacketException>();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void NegotiateShouldTransitionToSessionReservationRejectedAfterReceivingRejectedReservation()
|
||||
{
|
||||
// Arrange
|
||||
MultiplayerSessionReservation rejectedReservation = new MultiplayerSessionReservation(TestConstants.TEST_CORRELATION_ID, TestConstants.TEST_REJECTION_STATE);
|
||||
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
connectionContext.Reservation.Returns(rejectedReservation);
|
||||
|
||||
AwaitingSessionReservation connectionState = new AwaitingSessionReservation(TestConstants.TEST_CORRELATION_ID);
|
||||
|
||||
// Act
|
||||
connectionState.NegotiateReservationAsync(connectionContext);
|
||||
|
||||
// Assert
|
||||
connectionContext.Received().UpdateConnectionState(Arg.Any<SessionReservationRejected>());
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void NegotiateShouldThrowInvalidOperationExceptionWhenTheReservationIsNull()
|
||||
{
|
||||
// Arrange
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
connectionContext.Reservation.Returns((MultiplayerSessionReservation)null);
|
||||
|
||||
AwaitingSessionReservation connectionState = new AwaitingSessionReservation(TestConstants.TEST_CORRELATION_ID);
|
||||
|
||||
// Act
|
||||
Action action = () => connectionState.NegotiateReservationAsync(connectionContext);
|
||||
|
||||
// Assert
|
||||
action.Should().Throw<InvalidOperationException>();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void JoinSessionShouldThrowInvalidOperationException()
|
||||
{
|
||||
// Arrange
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
AwaitingSessionReservation connectionState = new AwaitingSessionReservation(TestConstants.TEST_CORRELATION_ID);
|
||||
|
||||
// Act
|
||||
Action action = () => connectionState.JoinSession(connectionContext);
|
||||
|
||||
// Assert
|
||||
action.Should().Throw<InvalidOperationException>();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void DisconnectShouldStopTheClient()
|
||||
{
|
||||
// Arrange
|
||||
IClient serverClient = Substitute.For<IClient>();
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
connectionContext.Client.Returns(serverClient);
|
||||
|
||||
AwaitingSessionReservation connectionState = new AwaitingSessionReservation(TestConstants.TEST_CORRELATION_ID);
|
||||
|
||||
// Act
|
||||
connectionState.Disconnect(connectionContext);
|
||||
|
||||
// Assert
|
||||
serverClient.Received().Stop();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void DisconnectShouldResetTheConnectionContext()
|
||||
{
|
||||
// Arrange
|
||||
IClient serverClient = Substitute.For<IClient>();
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
connectionContext.Client.Returns(serverClient);
|
||||
|
||||
AwaitingSessionReservation connectionState = new AwaitingSessionReservation(TestConstants.TEST_CORRELATION_ID);
|
||||
|
||||
// Act
|
||||
connectionState.Disconnect(connectionContext);
|
||||
|
||||
// Assert
|
||||
connectionContext.Received().ClearSessionState();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void DisconnectShouldTransitionToDisconnectedState()
|
||||
{
|
||||
// Arrange
|
||||
IClient serverClient = Substitute.For<IClient>();
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
connectionContext.Client.Returns(serverClient);
|
||||
|
||||
AwaitingSessionReservation connectionState = new AwaitingSessionReservation(TestConstants.TEST_CORRELATION_ID);
|
||||
|
||||
// Act
|
||||
connectionState.Disconnect(connectionContext);
|
||||
|
||||
// Assert
|
||||
connectionContext.Received().UpdateConnectionState(Arg.Any<Disconnected>());
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,144 @@
|
||||
using System;
|
||||
using FluentAssertions;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Nitrox.Test.Client.Communication.MultiplayerSession;
|
||||
using NitroxClient.Communication.Abstract;
|
||||
using NitroxModel.Packets;
|
||||
using NitroxModel.Packets.Exceptions;
|
||||
using NSubstitute;
|
||||
|
||||
namespace NitroxClient.Communication.MultiplayerSession.ConnectionState
|
||||
{
|
||||
[TestClass]
|
||||
public class EstablishingSessionPolicyStateTests
|
||||
{
|
||||
[TestMethod]
|
||||
public void NegotiateShouldTransitionToAwaitingReservationCredentialsState()
|
||||
{
|
||||
// Arrange
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
connectionContext.SessionPolicy.Returns(new MultiplayerSessionPolicy(TestConstants.TEST_CORRELATION_ID, false, TestConstants.TEST_MAX_PLAYER_CONNECTIONS, false));
|
||||
|
||||
EstablishingSessionPolicy connectionState = new EstablishingSessionPolicy(TestConstants.TEST_CORRELATION_ID);
|
||||
|
||||
// Act
|
||||
connectionState.NegotiateReservationAsync(connectionContext);
|
||||
|
||||
// Assert
|
||||
connectionContext.Received().UpdateConnectionState(Arg.Any<AwaitingReservationCredentials>());
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void NegotiateShouldTransitionToAwaitingReservationCredentialsStateWithPassword()
|
||||
{
|
||||
// Arrange
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
connectionContext.SessionPolicy.Returns(new MultiplayerSessionPolicy(TestConstants.TEST_CORRELATION_ID, false, TestConstants.TEST_MAX_PLAYER_CONNECTIONS, true));
|
||||
|
||||
EstablishingSessionPolicy connectionState = new EstablishingSessionPolicy(TestConstants.TEST_CORRELATION_ID);
|
||||
|
||||
// Act
|
||||
connectionState.NegotiateReservationAsync(connectionContext);
|
||||
|
||||
// Assert
|
||||
connectionContext.Received().UpdateConnectionState(Arg.Any<AwaitingReservationCredentials>());
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void NegotiateShouldThrowUncorrelatedPacketExceptionWhenThePolicyHasTheWrongCorrelationId()
|
||||
{
|
||||
// Arrange
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
connectionContext.SessionPolicy.Returns(new MultiplayerSessionPolicy("wrong", false, TestConstants.TEST_MAX_PLAYER_CONNECTIONS, false));
|
||||
|
||||
EstablishingSessionPolicy connectionState = new EstablishingSessionPolicy(TestConstants.TEST_CORRELATION_ID);
|
||||
|
||||
// Act
|
||||
Action action = () => connectionState.NegotiateReservationAsync(connectionContext);
|
||||
|
||||
// Assert
|
||||
action.Should().Throw<UncorrelatedPacketException>();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void NegotiateShouldThrowInvalidOperationExceptionIfTheSessionPolicyIsNull()
|
||||
{
|
||||
// Arrange
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
connectionContext.SessionPolicy.Returns((MultiplayerSessionPolicy)null);
|
||||
|
||||
EstablishingSessionPolicy connectionState = new EstablishingSessionPolicy(TestConstants.TEST_CORRELATION_ID);
|
||||
|
||||
// Act
|
||||
Action action = () => connectionState.NegotiateReservationAsync(connectionContext);
|
||||
|
||||
// Assert
|
||||
action.Should().Throw<InvalidOperationException>();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void JoinSessionShouldThrowInvalidOperationException()
|
||||
{
|
||||
// Arrange
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
EstablishingSessionPolicy connectionState = new EstablishingSessionPolicy(TestConstants.TEST_CORRELATION_ID);
|
||||
|
||||
// Act
|
||||
Action action = () => connectionState.JoinSession(connectionContext);
|
||||
|
||||
// Assert
|
||||
action.Should().Throw<InvalidOperationException>();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void DisconnectShouldStopTheClient()
|
||||
{
|
||||
// Arrange
|
||||
IClient serverClient = Substitute.For<IClient>();
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
connectionContext.Client.Returns(serverClient);
|
||||
|
||||
EstablishingSessionPolicy connectionState = new EstablishingSessionPolicy(TestConstants.TEST_CORRELATION_ID);
|
||||
|
||||
// Act
|
||||
connectionState.Disconnect(connectionContext);
|
||||
|
||||
// Assert
|
||||
serverClient.Received().Stop();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void DisconnectShouldResetTheConnectionContext()
|
||||
{
|
||||
// Arrange
|
||||
IClient serverClient = Substitute.For<IClient>();
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
connectionContext.Client.Returns(serverClient);
|
||||
|
||||
EstablishingSessionPolicy connectionState = new EstablishingSessionPolicy(TestConstants.TEST_CORRELATION_ID);
|
||||
|
||||
// Act
|
||||
connectionState.Disconnect(connectionContext);
|
||||
|
||||
// Assert
|
||||
connectionContext.Received().ClearSessionState();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void DisconnectShouldTransitionToDisconnectedState()
|
||||
{
|
||||
// Arrange
|
||||
IClient serverClient = Substitute.For<IClient>();
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
connectionContext.Client.Returns(serverClient);
|
||||
|
||||
EstablishingSessionPolicy connectionState = new EstablishingSessionPolicy(TestConstants.TEST_CORRELATION_ID);
|
||||
|
||||
// Act
|
||||
connectionState.Disconnect(connectionContext);
|
||||
|
||||
// Assert
|
||||
connectionContext.Received().UpdateConnectionState(Arg.Any<Disconnected>());
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,147 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using FluentAssertions;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Nitrox.Test.Client.Communication.MultiplayerSession;
|
||||
using NitroxClient.Communication.Abstract;
|
||||
using NitroxModel.Packets;
|
||||
using NSubstitute;
|
||||
|
||||
namespace NitroxClient.Communication.MultiplayerSession.ConnectionState
|
||||
{
|
||||
[TestClass]
|
||||
public class DisconnectedStateTests
|
||||
{
|
||||
[TestMethod]
|
||||
public void NegotiateShouldStartTheClientOnTheContext()
|
||||
{
|
||||
// Arrange
|
||||
IClient serverClient = Substitute.For<IClient>();
|
||||
serverClient.IsConnected.Returns(false);
|
||||
serverClient
|
||||
.When(client => client.StartAsync(Arg.Any<string>(), TestConstants.TEST_SERVER_PORT))
|
||||
.Do(info => serverClient.IsConnected.Returns(true));
|
||||
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
connectionContext.Client.Returns(serverClient);
|
||||
connectionContext.ServerPort.Returns(TestConstants.TEST_SERVER_PORT);
|
||||
|
||||
Disconnected connectionState = new Disconnected();
|
||||
|
||||
// Act
|
||||
connectionState.NegotiateReservationAsync(connectionContext);
|
||||
|
||||
// Assert
|
||||
serverClient.IsConnected.Should().BeTrue();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void NegotiateShouldSendMultiplayerSessionPolicyRequestPacketToClient()
|
||||
{
|
||||
// Arrange
|
||||
IClient serverClient = Substitute.For<IClient>();
|
||||
serverClient.IsConnected.Returns(false);
|
||||
serverClient
|
||||
.When(client => client.StartAsync(Arg.Any<string>(), TestConstants.TEST_SERVER_PORT))
|
||||
.Do(info => serverClient.IsConnected.Returns(true));
|
||||
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
connectionContext.Client.Returns(serverClient);
|
||||
connectionContext.ServerPort.Returns(TestConstants.TEST_SERVER_PORT);
|
||||
|
||||
Disconnected connectionState = new Disconnected();
|
||||
|
||||
// Act
|
||||
connectionState.NegotiateReservationAsync(connectionContext);
|
||||
|
||||
// Assert
|
||||
serverClient.Received().Send(Arg.Any<MultiplayerSessionPolicyRequest>());
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void NegotiateShouldTransitionToEstablishingSessionPolicyState()
|
||||
{
|
||||
// Arrange
|
||||
IClient serverClient = Substitute.For<IClient>();
|
||||
serverClient.IsConnected.Returns(false);
|
||||
serverClient
|
||||
.When(client => client.StartAsync(Arg.Any<string>(), TestConstants.TEST_SERVER_PORT))
|
||||
.Do(info => serverClient.IsConnected.Returns(true));
|
||||
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
connectionContext.Client.Returns(serverClient);
|
||||
connectionContext.ServerPort.Returns(TestConstants.TEST_SERVER_PORT);
|
||||
|
||||
Disconnected connectionState = new Disconnected();
|
||||
|
||||
// Act
|
||||
connectionState.NegotiateReservationAsync(connectionContext);
|
||||
|
||||
// Assert
|
||||
connectionContext.Received().UpdateConnectionState(Arg.Any<EstablishingSessionPolicy>());
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public async Task NegotiateShouldThrowInvalidOperationExceptionWhenClientIsNull()
|
||||
{
|
||||
// Arrange
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
connectionContext.Client.Returns((IClient)null);
|
||||
connectionContext.IpAddress.Returns(TestConstants.TEST_IP_ADDRESS);
|
||||
|
||||
Disconnected connectionState = new Disconnected();
|
||||
|
||||
// Act
|
||||
Func<Task> action = async () => await connectionState.NegotiateReservationAsync(connectionContext);
|
||||
|
||||
// Assert
|
||||
await action.Should().ThrowAsync<InvalidOperationException>();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public async Task NegotiateShouldThrowInvalidOperationExceptionWhenIpAddressIsNull()
|
||||
{
|
||||
// Arrange
|
||||
IClient client = Substitute.For<IClient>();
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
connectionContext.Client.Returns(client);
|
||||
connectionContext.IpAddress.Returns((string)null);
|
||||
|
||||
Disconnected connectionState = new Disconnected();
|
||||
|
||||
// Act
|
||||
Func<Task> action = async () => await connectionState.NegotiateReservationAsync(connectionContext);
|
||||
|
||||
// Assert
|
||||
await action.Should().ThrowAsync<InvalidOperationException>();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void JoinSessionShouldThrowInvalidOperationException()
|
||||
{
|
||||
// Arrange
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
Disconnected connectionState = new Disconnected();
|
||||
|
||||
// Act
|
||||
Action action = () => connectionState.JoinSession(connectionContext);
|
||||
|
||||
// Assert
|
||||
action.Should().Throw<InvalidOperationException>();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void DisconnectShouldThrowInvalidOperationException()
|
||||
{
|
||||
// Arrange
|
||||
IMultiplayerSessionConnectionContext connectionContext = Substitute.For<IMultiplayerSessionConnectionContext>();
|
||||
Disconnected connectionState = new Disconnected();
|
||||
|
||||
// Act
|
||||
Action action = () => connectionState.Disconnect(connectionContext);
|
||||
|
||||
// Assert
|
||||
action.Should().Throw<InvalidOperationException>();
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,119 @@
|
||||
using FluentAssertions;
|
||||
using FluentAssertions.Events;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Nitrox.Test.Client.Communication.MultiplayerSession;
|
||||
using NitroxClient.Communication.Abstract;
|
||||
using NitroxModel.Packets;
|
||||
using NSubstitute;
|
||||
|
||||
namespace NitroxClient.Communication.MultiplayerSession
|
||||
{
|
||||
[TestClass]
|
||||
public class MultiplayerSessionMangerTests
|
||||
{
|
||||
[TestMethod]
|
||||
public void ManagerShouldInitializeInDisconnectedStage()
|
||||
{
|
||||
// Arrange
|
||||
IClient client = Substitute.For<IClient>();
|
||||
|
||||
// Act
|
||||
IMultiplayerSession multiplayerSession = new MultiplayerSessionManager(client);
|
||||
|
||||
// Assert
|
||||
multiplayerSession.CurrentState.CurrentStage.Should().Be(MultiplayerSessionConnectionStage.DISCONNECTED);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void ManagerShouldInitializeWithClient()
|
||||
{
|
||||
// Arrange
|
||||
IClient client = Substitute.For<IClient>();
|
||||
|
||||
// Act
|
||||
IMultiplayerSession multiplayerSession = new MultiplayerSessionManager(client);
|
||||
|
||||
// Assert
|
||||
multiplayerSession.Client.Should().Be(client);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void ConnectShouldSetIpAddress()
|
||||
{
|
||||
// Arrange
|
||||
IClient client = Substitute.For<IClient>();
|
||||
IMultiplayerSession multiplayerSession = new MultiplayerSessionManager(client, TestConstants.TEST_CONNECTION_STATE);
|
||||
|
||||
// Act
|
||||
multiplayerSession.ConnectAsync(TestConstants.TEST_IP_ADDRESS, TestConstants.TEST_SERVER_PORT);
|
||||
|
||||
// Assert
|
||||
multiplayerSession.IpAddress.Should().Be(TestConstants.TEST_IP_ADDRESS);
|
||||
multiplayerSession.ServerPort.Should().Be(TestConstants.TEST_SERVER_PORT);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void ProcessSessionPolicyShouldSetThePolicy()
|
||||
{
|
||||
// Arrange
|
||||
IClient client = Substitute.For<IClient>();
|
||||
IMultiplayerSession multiplayerSession = new MultiplayerSessionManager(client, TestConstants.TEST_CONNECTION_STATE);
|
||||
|
||||
// Act
|
||||
multiplayerSession.ProcessSessionPolicy(TestConstants.TEST_SESSION_POLICY);
|
||||
|
||||
// Assert
|
||||
multiplayerSession.SessionPolicy.Should().Be(TestConstants.TEST_SESSION_POLICY);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void RequestSessionReservationShouldSetSettingsAndAuthContext()
|
||||
{
|
||||
// Arrange
|
||||
IClient client = Substitute.For<IClient>();
|
||||
IMultiplayerSession multiplayerSession = new MultiplayerSessionManager(client, TestConstants.TEST_CONNECTION_STATE);
|
||||
|
||||
// Act
|
||||
multiplayerSession.RequestSessionReservation(TestConstants.TEST_PLAYER_SETTINGS, TestConstants.TEST_AUTHENTICATION_CONTEXT);
|
||||
|
||||
// Assert
|
||||
multiplayerSession.PlayerSettings.Should().Be(TestConstants.TEST_PLAYER_SETTINGS);
|
||||
multiplayerSession.AuthenticationContext.Should().Be(TestConstants.TEST_AUTHENTICATION_CONTEXT);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void ProcessReservationResponsePacketShouldSetTheReservation()
|
||||
{
|
||||
// Arrange
|
||||
MultiplayerSessionReservation successfulReservation = new MultiplayerSessionReservation(
|
||||
TestConstants.TEST_CORRELATION_ID,
|
||||
TestConstants.TEST_PLAYER_ID,
|
||||
TestConstants.TEST_RESERVATION_KEY);
|
||||
|
||||
IClient client = Substitute.For<IClient>();
|
||||
IMultiplayerSession multiplayerSession = new MultiplayerSessionManager(client, TestConstants.TEST_CONNECTION_STATE);
|
||||
|
||||
// Act
|
||||
multiplayerSession.ProcessReservationResponsePacket(successfulReservation);
|
||||
|
||||
// Assert
|
||||
multiplayerSession.Reservation.Should().Be(successfulReservation);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void UpdateStateShouldRaiseEvent()
|
||||
{
|
||||
// Arrange
|
||||
IClient client = Substitute.For<IClient>();
|
||||
IMultiplayerSession multiplayerSession = new MultiplayerSessionManager(client);
|
||||
IMultiplayerSessionConnectionContext connectionContext = (IMultiplayerSessionConnectionContext)multiplayerSession;
|
||||
IMonitor<IMultiplayerSession> monitor = multiplayerSession.Monitor();
|
||||
|
||||
// Act
|
||||
connectionContext.UpdateConnectionState(TestConstants.TEST_CONNECTION_STATE);
|
||||
|
||||
// Assert
|
||||
monitor.Should().Raise("ConnectionStateChanged");
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,24 @@
|
||||
using NitroxClient.Communication.Abstract;
|
||||
using NitroxModel.DataStructures.Util;
|
||||
using NitroxModel.MultiplayerSession;
|
||||
using NitroxModel.Packets;
|
||||
using NSubstitute;
|
||||
|
||||
namespace Nitrox.Test.Client.Communication.MultiplayerSession
|
||||
{
|
||||
internal static class TestConstants
|
||||
{
|
||||
public const string TEST_IP_ADDRESS = "#.#.#.#";
|
||||
public const int TEST_SERVER_PORT = 11000;
|
||||
public const ushort TEST_PLAYER_ID = 1;
|
||||
public const string TEST_PLAYER_NAME = "TEST";
|
||||
public const string TEST_RESERVATION_KEY = "@#*(&";
|
||||
public const string TEST_CORRELATION_ID = "CORRELATED";
|
||||
public const int TEST_MAX_PLAYER_CONNECTIONS = 100;
|
||||
public const MultiplayerSessionReservationState TEST_REJECTION_STATE = MultiplayerSessionReservationState.REJECTED | MultiplayerSessionReservationState.UNIQUE_PLAYER_NAME_CONSTRAINT_VIOLATED;
|
||||
public static readonly AuthenticationContext TEST_AUTHENTICATION_CONTEXT = new AuthenticationContext(TEST_PLAYER_NAME, Optional.Empty);
|
||||
public static readonly MultiplayerSessionPolicy TEST_SESSION_POLICY = new MultiplayerSessionPolicy(TEST_CORRELATION_ID, false, TEST_MAX_PLAYER_CONNECTIONS, false);
|
||||
public static readonly PlayerSettings TEST_PLAYER_SETTINGS = new PlayerSettings(RandomColorGenerator.GenerateColor());
|
||||
public static readonly IMultiplayerSessionConnectionState TEST_CONNECTION_STATE = Substitute.For<IMultiplayerSessionConnectionState>();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user