NetworkBehaviourTests: InitSyncObject

This commit is contained in:
vis2k 2020-03-05 13:42:45 +01:00
parent cdea476212
commit e37e2ff2fc

View File

@ -137,4 +137,17 @@ public void HookGuard()
}
}
}
// we need to inherit from networkbehaviour to test protected functions
public class NetworkBehaviourInitSyncObjectTester : NetworkBehaviour
{
[Test]
public void InitSyncObject()
{
SyncObject syncObject = new SyncListBool();
InitSyncObject(syncObject);
Assert.That(syncObjects.Count, Is.EqualTo(1));
Assert.That(syncObjects[0], Is.EqualTo(syncObject));
}
}
}