コード例 #1
0
 public void Subject_is_not_generated_by_nsubstitute()
 {
     When(() => Subject.Received().DoSomething(), deferedExecution: true);
     WhenAction.ShouldThrow <NotASubstituteException>();
 }
コード例 #2
0
 public void Then_it_should_include_the_current_event_into_the_projection_exception()
 {
     WhenAction.ShouldThrow <ProjectionException>().Which.CurrentEvent.Should().Be(The <EventEnvelope>());
 }
コード例 #3
0
 public void Then_it_should_include_the_current_transaction_batch_into_the_projection_exception()
 {
     WhenAction.ShouldThrow <ProjectionException>().Which.TransactionBatch.Should().BeEquivalentTo(The <Transaction>());
 }
コード例 #4
0
ファイル: AsyncSpecs.cs プロジェクト: wmadzha/Chill
 public void Then_the_exception_should_be_observed()
 {
     WhenAction.ShouldThrow <ApplicationException>();
 }
コード例 #5
0
 public void Then_it_should_wrap_the_exception_into_a_projection_exception()
 {
     WhenAction.ShouldThrow <ProjectionException>()
     .Which.InnerException.Should().BeSameAs(The <InvalidOperationException>());
 }
コード例 #6
0
 public void Then_an_argument_exception_should_be_thrown()
 {
     WhenAction.ShouldThrow <ArgumentException>().WithMessage("No customer with id 12");
 }
コード例 #7
0
 public void When_deffering_execution_then_whenaction_can_be_used_to_test_for_exceptions()
 {
     When(() => { throw new AbandonedMutexException(); }, deferedExecution: true);
     WhenAction.ShouldThrow <AbandonedMutexException>();
 }
コード例 #8
0
 public void Then_it_should_throw()
 {
     WhenAction.ShouldThrow <ProjectionException>();
 }
コード例 #9
0
 public void Then_it_should_identify_the_projector_via_the_projection_type()
 {
     WhenAction.ShouldThrow <ProjectionException>()
     .Which.Projector.Should().Be(typeof(ProductCatalogEntry).ToString());
 }
コード例 #10
0
ファイル: StateBuilderSpecs.cs プロジェクト: wmadzha/Chill
 public void When_executing_later_then_whenaction_can_be_used_to_test_for_exceptions()
 {
     WhenLater(() => { throw new AbandonedMutexException(); });
     WhenAction.ShouldThrow <AbandonedMutexException>();
 }