Beispiel #1
0
        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}.*"));
        }
Beispiel #2
0
        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}"));
        }