public void Then_it_should_include_the_current_event()
 {
     WhenAction.ShouldThrow <ProjectionException>()
     .Which.CurrentEvent.Should().BeSameAs(The <EventEnvelope>());
 }
 public void Then_it_should_throw_projection_exception_with_the_inner_exception()
 {
     WhenAction.ShouldThrow <ProjectionException>()
     .Which.InnerException.Should().BeSameAs(The <InvalidOperationException>());
 }
 public void Then_it_should_identify_the_projector_via_the_projection_type()
 {
     WhenAction.ShouldThrow <ProjectionException>()
     .Which.Projector.Should().Be(typeof(ProductCatalogEntry).ToString());
 }
Beispiel #4
0
 public void Then_it_should_precede_the_simple_equality_step()
 {
     WhenAction.ShouldNotThrow();
 }
Beispiel #5
0
 public void When_executing_later_then_whenaction_can_be_used_to_test_for_exceptions()
 {
     WhenLater(() => { throw new AbandonedMutexException(); });
     WhenAction.ShouldThrow <AbandonedMutexException>();
 }
Beispiel #6
0
 public void When_deferring_execution_then_whenaction_can_be_used_to_test_for_exceptions()
 {
     When(() => { throw new AbandonedMutexException(); }, deferredExecution: true);
     WhenAction.ShouldThrow <AbandonedMutexException>();
 }
 public void Subject_is_not_generated_by_nsubstitute()
 {
     When(() => Subject.Received().DoSomething(), deferedExecution: true);
     WhenAction.ShouldThrow <NotASubstituteException>();
 }
Beispiel #8
0
 public void Then_it_should_not_fail()
 {
     WhenAction.ShouldNotThrow();
 }