Class ConditionalPredicateBase
Derive from this class to create your own conditional handling for your NetcodeIntegrationTest integration tests when dealing with more complicated scenarios where initializing values, storing state to be used across several integration tests.
Implements
Inherited Members
Namespace: Unity.Netcode.TestHelpers.Runtime
Assembly: Unity.Netcode.Runtime.Tests.dll
Syntax
public class ConditionalPredicateBase : IConditionalPredicate
Properties
TimedOut
Will be set to true if timed out.
Declaration
public bool TimedOut { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
Finished(bool)
Wait for condition has finished:
Condition(s) met or timed out
Declaration
public void Finished(bool timedOut)
Parameters
Type | Name | Description |
---|---|---|
bool | timedOut | true or false |
HasConditionBeenReached()
Test the conditions of the test to be reached
Declaration
public bool HasConditionBeenReached()
Returns
Type | Description |
---|---|
bool | true or false |
OnFinished()
Override this to clean up anything used in the conditional check.
Declaration
protected virtual void OnFinished()
OnHasConditionBeenReached()
Override this method to incorporate your own conditional logic
Declaration
protected virtual bool OnHasConditionBeenReached()
Returns
Type | Description |
---|---|
bool | true for condition being met and false for the condition has yet to be met. |
OnStarted()
Override this to initialize anything for the conditioinal check.
Declaration
protected virtual void OnStarted()
Started()
Wait for condition has started
Declaration
public void Started()