public void AfterTest() { GameServiceProvider.ClearGameServiceProvider(); _service = null; _entity = null; }
public void BeforeTest() { _entity = new GameObject().AddComponent <TestPersistentEntityComponent>(); _entity.gameObject.transform.position = new Vector3(12.0f, 44.0f, 33.0f); _entity.gameObject.transform.eulerAngles = new Vector3(33.0f, -12.0f, 2.0f); _behaviour = _entity.gameObject.AddComponent <MockPersistentBehaviourComponent>(); _otherBehaviour = _entity.gameObject.AddComponent <MockPersistentBehaviourComponent>(); _service = new MockPersistenceService(); new GameObject().AddComponent <TestGameServiceProvider>().TestAwake(); GameServiceProvider.CurrentInstance.AddService <IPersistenceServiceInterface>(_service); }