Class NetworkListTestPredicate
Handles the more generic conditional logic for NetworkList tests which can be used with the WaitForConditionOrTimeOut(Func<Boolean>, TimeoutHelper) that accepts anything derived from the ConditionalPredicateBase class as a parameter.
Inherited Members
Namespace: Unity.Netcode.RuntimeTests
Syntax
public class NetworkListTestPredicate : ConditionalPredicateBase, IConditionalPredicate
Constructors
NetworkListTestPredicate(NetworkVariableTest, NetworkVariableTest, NetworkListTestPredicate.NetworkListTestStates, Int32)
Declaration
public NetworkListTestPredicate(NetworkVariableTest player1OnServer, NetworkVariableTest player1OnClient1, NetworkListTestPredicate.NetworkListTestStates networkListTestState, int elementCount)
Parameters
Type | Name | Description |
---|---|---|
NetworkVariableTest | player1OnServer | |
NetworkVariableTest | player1OnClient1 | |
NetworkListTestPredicate.NetworkListTestStates | networkListTestState | |
Int32 | elementCount |
Methods
OnFinished()
When finished, check if a time out occurred and if so assert and provide meaningful information to troubleshoot why
Declaration
protected override void OnFinished()
Overrides
OnHasConditionBeenReached()
Determines if the condition has been reached for the current NetworkListTestState
Declaration
protected override bool OnHasConditionBeenReached()
Returns
Type | Description |
---|---|
Boolean |
Overrides
SetNetworkListTestState(NetworkListTestPredicate.NetworkListTestStates)
Declaration
public void SetNetworkListTestState(NetworkListTestPredicate.NetworkListTestStates networkListTestState)
Parameters
Type | Name | Description |
---|---|---|
NetworkListTestPredicate.NetworkListTestStates | networkListTestState |