public async Task ErrorHandlingLocalError() { LocalErrorGrain localGrain = new LocalErrorGrain(); Task<int> intPromise = localGrain.GetAxBError(); try { await intPromise; Assert.True(false, "Should not have executed"); } catch (Exception exc2) { Assert.Equal(exc2.GetBaseException().Message, (new Exception("GetAxBError-Exception")).Message); } Assert.True(intPromise.Status == TaskStatus.Faulted); }
public async Task ErrorHandlingLocalError() { LocalErrorGrain localGrain = new LocalErrorGrain(); Task <int> intPromise = localGrain.GetAxBError(); try { await intPromise; Assert.True(false, "Should not have executed"); } catch (Exception exc2) { Assert.Equal(exc2.GetBaseException().Message, (new Exception("GetAxBError-Exception")).Message); } Assert.True(intPromise.Status == TaskStatus.Faulted); }