public async Task SyncExecute_throws_exception_from_aggregate_on_fault_wait_by_Node() { var syncCommand = new AlwaysFaultCommand(Guid.NewGuid()); var expectedMessage = Expect.Message <SampleAggregateChangedEvent>(e => e.SourceId, syncCommand.AggregateId); await GridNode.Execute(CommandPlan.New(syncCommand, Timeout, expectedMessage)) .ShouldThrow <SampleAggregateException>(); }
public async Task Then_execute_throws_exception_from_aggregate_with_stack_trace() { var syncCommand = new AlwaysFaultCommand(Guid.NewGuid()); var expectedMessage = Expect.Message <SampleAggregateChangedEvent>(e => e.SourceId, syncCommand.AggregateId); await GridNode.Execute(CommandPlan.New(syncCommand, Timeout, expectedMessage)) .ShouldThrow <SampleAggregateException>( e => e.StackTrace.Contains(typeof(SampleAggregate).Name)); }