public async Task Rem_Azure_Wrong_Grain() { IReminderGrainWrong grain = GrainClient.GrainFactory.GetGrain <IReminderGrainWrong>(0); await Assert.ThrowsAsync <InvalidOperationException>(() => grain.StartReminder(DR)); }
public async Task Rem_Azure_Wrong_Grain() { log.Info(TestContext.TestName); try { IReminderGrainWrong grain = GrainClient.GrainFactory.GetGrain <IReminderGrainWrong>(0); bool success = await grain.StartReminder(DR); // should throw exception Assert.IsFalse(success); } catch (Exception exc) { log.Info("Failed to register reminder: {0}", exc.Message); throw exc.GetBaseException(); } }