public void BeforeTest() { _trigger = new GameObject().AddComponent <TestSaveProgressTriggerComponent>(); var characterObject = new GameObject(); characterObject.AddComponent <MockActionStateMachineComponent>(); characterObject.AddComponent <MockInputBinderComponent>(); characterObject.AddComponent <TestUnityMessageEventDispatcherComponent>().TestAwake(); _character = characterObject.AddComponent <TestCharacterComponent>(); _entity = new GameObject().AddComponent <MockPersistentEntityComponent>(); _entityKey = "Whatever"; _service = new MockPersistenceService { GetEntitiesResult = new Dictionary <string, IPersistentEntityInterface> { { _entityKey, _entity } } }; new GameObject().AddComponent <TestGameServiceProvider>().TestAwake(); GameServiceProvider.CurrentInstance.AddService <IPersistenceServiceInterface>(_service); }
public void AfterTest() { GameServiceProvider.ClearGameServiceProvider(); _service = null; _entity = null; _character = null; _trigger = null; }
public void AfterTest() { _entity = null; _service = null; }
public void BeforeTest() { _service = new PersistenceService(); _entity = new GameObject().AddComponent <MockPersistentEntityComponent>(); }