public void When_exception_is_thrown_in_deffered_execution_expected_exception_is_filled() { Action whenActionASync = () => { throw new AbandonedMutexException(); }; When(whenActionASync, deferedExecution: true); CaughtException.Should().BeOfType <AbandonedMutexException>(); }
public void When_exception_is_thrown_in_later_execution_expected_exception_is_filled() { Action whenActionASync = () => { throw new AbandonedMutexException(); }; WhenLater(whenActionASync); CaughtException.Should().BeOfType <AbandonedMutexException>(); }
public void When_exception_is_thrown_in_async_method_in_deffered_execution_expected_exception_is_filled() { Func <Task> whenActionASync = () => Task.Factory.StartNew(() => { throw new AbandonedMutexException(); }); When(whenActionASync, deferedExecution: true); CaughtException.Should().BeOfType <AbandonedMutexException>(); }
public Spesification(ITestOutputHelper outputHelper) { History = Given(); Command = When(); var sut = new TAggregate(); var store = new SpecificationAggregateStore(sut); var snapshotStore = new SpesificationAggregateSnapshotStore(); try { sut.Load(History); GetHandler(store, snapshotStore)(Command).GetAwaiter().GetResult(); } catch (Exception e) { CaughtException = e; } RaisedEvents = store.RaisedEvents; Snapshots = snapshotStore.GetSnapshotAsync <TAggregate>(null, sut.Id).Result; if (Snapshots != null) { outputHelper.WriteLine($"Snapshot:{Snapshots.AggregateId},{Snapshots.Version}"); } if (CaughtException != null) { outputHelper.WriteLine($"Error : {CaughtException.ToString()}"); } Print(outputHelper); }
public Spesification(ITestOutputHelper outputHelper) { History = Given(); Command = When(); var sut = new TAggregate(); var store = new SpecificationAggregateStore(sut); try { sut.Load(History); GetHandler(store)(Command).GetAwaiter().GetResult(); } catch (Exception e) { CaughtException = e; } RaisedEvents = store.RaisedEvents; if (CaughtException != null) { outputHelper.WriteLine($"Error : {CaughtException.ToString()}"); } Print(outputHelper); }
public void Then_it_will_throw_an_unregistered_domain_event_exception() { CaughtException.WillBeOfType <UnregisteredDomainEventException>(); }
public void it_doesnt_throw() { CaughtException.Should().BeNull(); }
public void The_an_exception_will_be_thrown() { CaughtException.WillBeOfType <IlligalStateAssignmentException>(); }
public void Should_throw_ArgumentNullException() { CaughtException.Should().BeOfType <ArgumentNullException>(); }
public void Then_a_non_existing_client_exception_will_be_thrown() { CaughtException.WillBeOfType <NonExistingClientException>(); }
public void The_an_exception_will_be_thrown() { CaughtException.WillBeOfType <MethodMissingException>(); }
public void Then_it_will_not_throw_an_exception() { CaughtException.WillBeOfType <ThereWasNoExceptionButOneWasExpectedException>(); }
public void Then_the_event_type_should_be_SomeEvent() { CaughtException.As <HandleNotFound>().EventType.Should().BeAssignableTo <NotRegisteredEvent>(); }
public void Then_throws_an_exception() { CaughtException.Should().BeAssignableTo <HandleNotFound>(); }
public void review_content_is_published_but_status_is_not_pendingApprove() { CaughtException.Should().BeOfType <ReviewInvalidStatus>(); }
public void Then_an_account_balance_to_low_exception_will_be_thrown() { CaughtException.WillBeOfType <AccountBalanceToLowException>(); }
public void Then_an_account_balance_not_zero_exception_will_be_thrown() { CaughtException.WillBeOfType <AccountBalanceNotZeroException>(); }
public void Then_the_exception_message_will_be() { CaughtException.WithMessage(string.Format("The amount {0:C} is larger than your current balance {1:C}", 10.5M, 0)); }
public void Then_a_non_existing_bank_card_is_disabled_will_be_thrown() { CaughtException.WillBeOfType <BankCardIsDisabledException>(); }
public void Then_we_expect_an_exception_to_occure() { CaughtException.Should().BeOfType <DomainException>(); }
public void a_EventStoreConcurrencyException_should_be_thrown() => CaughtException.ShouldBeOfType <EventStoreConcurrencyException>();
public object Any(CaughtException request) { throw new ArgumentException(); }
public void Then_an_DomainException_should_occure() { CaughtException.Should().BeOfType <DomainException>(); CaughtException.Message.Should().StartWith("Already contains member with id"); }
public void Then_a_closed_account_exception_will_be_thrown() { CaughtException.WillBeOfType <ClosedAccountException>(); }
public void an_aggregate_not_found_exception_is_thrown() => CaughtException.ShouldBeOfType <AggregateNotFoundException>();
public void Then_the_newly_created_account_will_be_saved() { CaughtException.WillBeOfType <UnknownAccountException>(); }
public void a_HostedEnvironmentConfigurationException_is_thrown() => CaughtException.ShouldBeOfType <HostedEnvironmentConfigurationException>();
public void Then_a_non_existing_account_exception_will_be_thrown() { CaughtException.WillBeOfType <NonExitsingAccountException>(); }
public void The_an_exception_will_be_thrown() { CaughtException.WillBeOfType <UnregisteredDomainEventException>(); }