﻿using AsmodeeDigital.Common.Plugin.Manager.Coroutine;
using System.Collections;

namespace AsmodeeDigital.Common.Plugin.Tests.Mocks
{
    /// <summary>
    /// Mock of Coroutine Manager
    /// </summary>
    public class CoroutineManagerTest : ICoroutineManager
    {
        /// <summary>
        /// Execute the coroutine regardless of WaitForSeconds, WaitForFrame, etc...
        /// Useful to bypass the waiting of behaviors
        /// </summary>
        /// <param name="enumerator">Coroutine to execute</param>
        public void StartCoroutine(IEnumerator enumerator)
        {
            //---> Execute Coroutine regardless of WaitForSeconds
            while (enumerator.MoveNext())
            {
            }
        }
    }
}
