public async Task GoodGetGenericsAsync() { var enumerator = AsyncEnumerators.GoodGetGenericsAsync <object>(); while (await enumerator.MoveNextAsync()) { } }
public async Task GoodGetReferencesAsyncWithoutAwait() { var enumerator = AsyncEnumerators.GoodGetReferencesAsyncWithoutAwait(); while (await enumerator.MoveNextAsync()) { } }
public Task BadGetGenericsAsync() { return(Assert.ThrowsExceptionAsync <NullReferenceException>(async() => { var enumerator = AsyncEnumerators.BadGetGenericsAsync <object>(); while (await enumerator.MoveNextAsync()) { } })); }
public Task BadGetReferencesAsyncWithoutAwait() { return(Assert.ThrowsExceptionAsync <NullReferenceException>(async() => { var enumerator = AsyncEnumerators.BadGetReferencesAsyncWithoutAwait(); while (await enumerator.MoveNextAsync()) { } })); }