public static void TaskExGenericFromExceptionIsFaulted() { var exception = new Exception(); var task = TaskExEx.FromException <bool>(exception); Assert.IsTrue(task.IsFaulted); }
public static void TaskExGenericFromExceptionRespectsException() { var exception = new Exception(); var task = TaskExEx.FromException <bool>(exception); // ReSharper disable once PossibleNullReferenceException Assert.AreEqual(exception, task.Exception.InnerException); }