Exemplo n.º 1
0
        IEnumerator TestAsyncApiWrapper_Normal()
        {
            var co = Coroutines.Start <int>(TestApiWrapper.AddAsync(3, 5, 0.1f));

            yield return(co);

            TestUtil.AssertEq(8, co.Get());
        }
Exemplo n.º 2
0
        IEnumerator TestAsyncApiWrapper_EndException()
        {
            // Set 0 to the second argument to generate an exception in End_AddAsync()
            var co = Coroutines.Start <int>(TestApiWrapper.AddAsync(3, 0, 0.1f));

            yield return(co);

            TestUtil.AssertThrow <Exception>(() => co.Get());
        }