public void AfterTest() { _playerUi.TestDestroy(); _playerUi = null; _actionStateMachineComponent = null; GameInstance.ClearGameInstance(); LocalisationManager.CurrentLocalisationInterface = null; }
public void BeforeTest() { var locInstance = new MockLocalisationInterface { GetTextForLocalisationKeyResult = new LocalisedText(new LocalisedTextEntries()) }; LocalisationManager.CurrentLocalisationInterface = locInstance; var instance = new GameObject().AddComponent <MockInputComponent>(); instance.gameObject.AddComponent <TestGameInstance>().TestAwake(); var player = new GameObject(); player.AddComponent <TestUnityMessageEventDispatcherComponent>().TestAwake(); _actionStateMachineComponent = player.AddComponent <MockActionStateMachineComponent>(); _playerUi = player.gameObject.AddComponent <TestPlayerUIControllerComponent>(); _playerUi.TestStart(); }