public void RequiresNonNullTask() { Assert.Throws <InvalidOperationException>(new Action(() => ClassWithAsyncMethods.GetNonNullTask())); }
public async void RequiresNonNullConcreteTypeAsync() { await Assert.ThrowsAsync <InvalidOperationException>(() => ClassWithAsyncMethods.GetNonNullAsync()); }
public void AllowsNullTask() { var result = ClassWithAsyncMethods.GetNullTask(); Assert.Null(result); }
public async void AllowsNullGenericTypeAsyncWithDelay2() { var result = await ClassWithAsyncMethods.GetNullAsyncWithDelay2 <string>(); Assert.Null(result); }
public async void AllowsMaybeNullGenericTypeAsync() { var result = await ClassWithAsyncMethods.GetMaybeNullAsync <string>(); Assert.Null(result); }
public async void RequiresNonNullGenericTypeAsyncWithDelay() { await Assert.ThrowsAsync <InvalidOperationException>(() => ClassWithAsyncMethods.GetNonNullAsyncWithDelay <string>()); }
public async void AllowsNullConcreteTypeAsync() { var result = await ClassWithAsyncMethods.GetNullAsync(); Assert.Null(result); }