public void Subject_is_not_generated_by_nsubstitute() { When(() => Subject.Received().DoSomething(), deferedExecution: true); WhenAction.ShouldThrow <NotASubstituteException>(); }
public void Then_it_should_include_the_current_event_into_the_projection_exception() { WhenAction.ShouldThrow <ProjectionException>().Which.CurrentEvent.Should().Be(The <EventEnvelope>()); }
public void Then_it_should_include_the_current_transaction_batch_into_the_projection_exception() { WhenAction.ShouldThrow <ProjectionException>().Which.TransactionBatch.Should().BeEquivalentTo(The <Transaction>()); }
public void Then_the_exception_should_be_observed() { WhenAction.ShouldThrow <ApplicationException>(); }
public void Then_it_should_wrap_the_exception_into_a_projection_exception() { WhenAction.ShouldThrow <ProjectionException>() .Which.InnerException.Should().BeSameAs(The <InvalidOperationException>()); }
public void Then_an_argument_exception_should_be_thrown() { WhenAction.ShouldThrow <ArgumentException>().WithMessage("No customer with id 12"); }
public void When_deffering_execution_then_whenaction_can_be_used_to_test_for_exceptions() { When(() => { throw new AbandonedMutexException(); }, deferedExecution: true); WhenAction.ShouldThrow <AbandonedMutexException>(); }
public void Then_it_should_throw() { WhenAction.ShouldThrow <ProjectionException>(); }
public void Then_it_should_identify_the_projector_via_the_projection_type() { WhenAction.ShouldThrow <ProjectionException>() .Which.Projector.Should().Be(typeof(ProductCatalogEntry).ToString()); }
public void When_executing_later_then_whenaction_can_be_used_to_test_for_exceptions() { WhenLater(() => { throw new AbandonedMutexException(); }); WhenAction.ShouldThrow <AbandonedMutexException>(); }