public void Then_it_should_wrap_the_exception_into_a_projection_exception()
 {
     WhenAction.Should().Throw <ProjectionException>()
     .Where(e => e.CurrentEvent == The <EventEnvelope>())
     .WithInnerException <InvalidOperationException>()
     .WithMessage("*moment*");
 }
 public void Then_it_should_stop()
 {
     if (!Task.Run(() => WhenAction.Should().NotThrow()).Wait(TimeSpan.FromSeconds(10)))
     {
         throw new InvalidOperationException("The subscription has not stopped in 10 seconds.");
     }
 }
Beispiel #3
0
 public void When_executing_later_then_whenaction_can_be_used_to_test_for_exceptions()
 {
     WhenLater(() =>
     {
         throw new AbandonedMutexException();
     });
     WhenAction.Should().Throw <AbandonedMutexException>();
 }
Beispiel #4
0
 public void When_deferring_execution_then_whenaction_can_be_used_to_test_for_exceptions()
 {
     When(() =>
     {
         throw new AbandonedMutexException();
     }, deferredExecution: true);
     WhenAction.Should().Throw <AbandonedMutexException>();
 }
Beispiel #5
0
 public void Then_it_should_precede_the_simple_equality_step()
 {
     WhenAction.Should().NotThrow();
 }
 public void It_should_not_throw()
 {
     WhenAction.Should().NotThrow();
 }
            public void It_should_throw_without_affecting_the_projection()
            {
                WhenAction.Should().Throw <ProjectionException>();

                existingProjection.Category.Should().Be("OldCategory");
            }
 public void Then_it_should_not_fail()
 {
     WhenAction.Should().NotThrow();
 }
 public void Then_it_should_throw()
 {
     WhenAction.Should().Throw <ComponentNotRegisteredException>();
 }
            public void Then_it_should_return_a_fake_using_fake_it_easy()
            {
                WhenAction.Should().NotThrow();

                Result.Value.Should().Be(0);
            }
Beispiel #11
0
 public void Then_the_exception_should_not_be_wrapped_to_an_aggregate_exception()
 {
     WhenAction.Should().NotThrow <AggregateException>();
 }
Beispiel #12
0
 public void Then_the_exception_should_be_observed()
 {
     WhenAction.Should().Throw <ApplicationException>();
 }