public static void Test_SubProcess_check_async() { SubProcess sp = new SubProcess(echoArgs, "--exit", "2"); Task task = sp.CheckAsync(); try { task.Wait(); Assert.Fail("Did not throw on timeout"); } catch (AggregateException ae) { Assert.AreEqual(1, ae.InnerExceptions.Count); Assert.IsTrue(ae.InnerExceptions[0] is SubProcess.Failed); } }