Skip to content

Instantly share code, notes, and snippets.

@Vannevelj
Created June 24, 2014 13:52
Show Gist options
  • Save Vannevelj/4d48083016f3a0c94d55 to your computer and use it in GitHub Desktop.
Save Vannevelj/4d48083016f3a0c94d55 to your computer and use it in GitHub Desktop.
try
{
var irrelevant = myApi.GetUserInfoAsync().AsTask().Result;
}
catch (AggregateException ae)
{
if (ae.InnerException.GetType() == typeof(InvalidOperationException))
{
Assert.IsTrue(true);
}
else
{
Assert.Fail("There was no InvalidOperationException.");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment