Class ClientApprovalDenied
Inherited Members
Namespace: Unity.Netcode.RuntimeTests
Assembly: Unity.Netcode.RuntimeTests.dll
Syntax
public class ClientApprovalDenied : NetcodeIntegrationTest
Properties
NumberOfClients
Gets the number of clients to be created for the integration test.
Declaration
protected override int NumberOfClients { get; }
Property Value
| Type | Description |
|---|---|
| int |
Overrides
Methods
ClientDeniedAndDisconnectionNotificationTest()
Validates that when a pending client is denied approval the server-host OnClientDisconnected method will return the valid pending client identifier.
Declaration
[UnityTest]
public IEnumerator ClientDeniedAndDisconnectionNotificationTest()
Returns
| Type | Description |
|---|---|
| IEnumerator |
OnNewClientCreated(NetworkManager)
Invoked when a new client has been created during the integration test. Override this method to perform any setup or configuration needed for the new client before it is started.
Declaration
protected override void OnNewClientCreated(NetworkManager networkManager)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkManager | networkManager | The NetworkManager instance of the client. |
Overrides
ShouldWaitForNewClientToConnect(NetworkManager)
CreateAndStartNewClient Only Override this method to bypass the waiting for a client to connect.
Declaration
protected override bool ShouldWaitForNewClientToConnect(NetworkManager networkManager)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkManager | networkManager | The NetworkManager instance of the client. |
Returns
| Type | Description |
|---|---|
| bool | True if the test should wait for the new client to connect; otherwise, false. |
Overrides
Remarks
Use this for testing connection and disconnection scenarios