From bf1ac3279b9f841fc25112467b71a75968105c7a Mon Sep 17 00:00:00 2001 From: vis2k Date: Sat, 7 Mar 2020 13:58:52 +0100 Subject: [PATCH] improve previous test --- Assets/Mirror/Tests/Editor/NetworkBehaviourTests.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Assets/Mirror/Tests/Editor/NetworkBehaviourTests.cs b/Assets/Mirror/Tests/Editor/NetworkBehaviourTests.cs index c1f5142e6..2fde95a0f 100644 --- a/Assets/Mirror/Tests/Editor/NetworkBehaviourTests.cs +++ b/Assets/Mirror/Tests/Editor/NetworkBehaviourTests.cs @@ -664,6 +664,10 @@ public void GetRpcHandler() NetworkBehaviour.CmdDelegate expected = NetworkBehaviourDelegateComponent.Delegate; Assert.That(func, Is.EqualTo(expected)); + // invalid hash should return null handler + NetworkBehaviour.CmdDelegate funcNull = NetworkBehaviour.GetRpcHandler(1234); + Assert.That(funcNull, Is.Null); + // clean up NetworkBehaviour.ClearDelegates(); }