12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- using System.Collections;
- using System.Collections.Generic;
- using NUnit.Framework;
- using UnityEngine;
- using UnityEngine.TestTools;
- using KairoEngine.Core;
- using KairoEngine.Core.GameActions;
- namespace KairoEngine.Core.EditorTests.GameActions
- {
- public class GameActionsControllerTests
- {
- [Test]
- public void GameActionsController_HasActionListTest()
- {
- GameActionsController controller = new GameActionsController();
- Assert.NotNull(controller.actions, "GameActionsController action list is Null.");
- }
- [UnityTest]
- public IEnumerator GameActionsController_DuplicationTest()
- {
- LogAssert.Expect(LogType.Log, "Hello world");
- GameActionsController controller = new GameActionsController();
- DebugLogGameAction debugAction = new DebugLogGameAction(controller);
- debugAction.message = "Hello world";
- controller.actions.Add(debugAction);
- try
- {
- GameActionsController duplicatedController = controller.Duplicate();
- duplicatedController.Start();
- }
- catch (System.Exception e)
- {
- Debug.LogError(e);
- throw;
- }
- yield return null;
- yield return null;
- yield return null;
- }
- }
- }
|