public IEnumerator TestCoroutine() { updateCounter = 0; ThreadingService.RunRoutine(CoroutineAsync()); yield return(new WaitForSeconds(1)); Assert.IsTrue(updateCounter == 5); }
public async Task TestCoroutine() { updateCounter = 0; ThreadingService.RunRoutine(CoroutineAsync()); await Task.Delay(5000); Console.WriteLine(updateCounter); Assert.IsTrue(updateCounter == 5); }