public void A_Foreach_must_complete_future_with_failure_when_function_throws()
{
this.AssertAllStagesStopped(() =>
{
var error = new TestException("test");
var future = Source.Single(1).RunForeach(_ =>
{
throw error;
}, Materializer);
future.Invoking(f => f.Wait(TimeSpan.FromSeconds(3)))
.ShouldThrow<TestException>()
.And.Should()
.Be(error);
}, Materializer);
}
}