You could do this...
int actual = uut.TryExecute<int>(() =>
{
throw ex;
// return 1; //<<<<<<<< Unrechable code detected here
});
And this is full...
var uut = new Bar(null);
var ex = new ArgumentException("foo");
try
{
int actual = uut.TryExecute<int>(() =>
{
throw ex;
});
}
catch (Exception fault)
{
Assert.IsNotNull(fault.Message);
}