public IEnumerator ShouldNotThrow() { var dispatcher = MainQueueDispatcherFactory.Create(false); dispatcher.Dispatch(() => { throw new System.Exception(expectedException); }); yield return(null); GameObject.Destroy(dispatcher.gameObject); LogAssert.Expect(LogType.Error, new Regex($"{MainQueueDispatcher.ExceptionErrorMessage}.*")); }
public IEnumerator ShouldThrow() { var dispatcher = MainQueueDispatcherFactory.Create(false, shouldThrowExceptions: true); dispatcher.Dispatch(() => { throw new System.Exception(expectedException); }); yield return(null); GameObject.Destroy(dispatcher.gameObject); LogAssert.Expect(LogType.Exception, new Regex($".*{expectedException}")); }