public void Should_create_correct_events()
 {
     Assert.IsType <OfferStockSet>(PublishedEvents.First());
     Assert.IsType <ProductHidden>(PublishedEvents[1]);
     Assert.IsType <OfferHidden>(PublishedEvents[2]);
     Assert.IsType <OfferUnpublishedFromMerchant>(PublishedEvents.Last());
 }
예제 #2
0
 public void Then_the_published_event_will_contain_the_address_of_the_client()
 {
     PublishedEvents.Last <CustomerCreatedEvent>().Street.Should().Be.EqualTo("Ringstraße");
     PublishedEvents.Last <CustomerCreatedEvent>().StreetNumber.Should().Be.EqualTo("1");
     PublishedEvents.Last <CustomerCreatedEvent>().PostalCode.Should().Be.EqualTo("1010");
     PublishedEvents.Last <CustomerCreatedEvent>().City.Should().Be.EqualTo("Wien");
 }
 public void Then_it_will_generate_an_deposite_event_with_the_expected_ammount()
 {
     PublishedEvents.Last <MoneyTransferReceivedEvent>().Amount.WillBe(5.0M);
     PublishedEvents.Last <MoneyTransferReceivedEvent>().Balance.WillBe(25.0M);
     PublishedEvents.Last <MoneyTransferReceivedEvent>().TargetAccount.WillBe("1234567890");
     PublishedEvents.Last <MoneyTransferReceivedEvent>().SourceAccount.WillBe("0987654321");
 }
        public void the_person_should_have_moved_house()
        {
            Assert.That(this.PublishedEvents.Count <IEvent>() == 1);

            Console.WriteLine("count:\t{0}\r\nthing:\t{1}", PublishedEvents.Count <IEvent>(), PublishedEvents);
            Console.WriteLine("lastevent:\t{0}", PublishedEvents.Last <IEvent>());
        }
예제 #5
0
 public void Then_the_published_event_will_contain_the_new_address_of_the_client()
 {
     PublishedEvents.Last <ClientMovedEvent>().Street.WillBe("Welhavens gate");
     PublishedEvents.Last <ClientMovedEvent>().StreetNumber.WillBe("49b");
     PublishedEvents.Last <ClientMovedEvent>().PostalCode.WillBe("5006");
     PublishedEvents.Last <ClientMovedEvent>().City.WillBe("Bergen");
 }
 public void Then_the_published_event_will_contain_the_expected_details_of_the_closed_account()
 {
     PublishedEvents.Last <ClosedAccountCreatedEvent>().OriginalAccountId.WillBe(_accountId);
     PublishedEvents.Last <ClosedAccountCreatedEvent>().ClientId.WillBe(_clientId);
     PublishedEvents.Last <ClosedAccountCreatedEvent>().AccountName.WillBe("Closed Account");
     PublishedEvents.Last <ClosedAccountCreatedEvent>().AccountNumber.WillBe("1234567890");
 }
예제 #7
0
        public void Should_verify_last_event_properties()
        {
            var childDisabledEvent = PublishedEvents.Last().As <ChildDisabledEvent>();

            childDisabledEvent.AggregateId.Should().Be(_event2.AggregateId);
            childDisabledEvent.EntityId.Should().Be(_event2.EntityId);
        }
 public void Then_the_published_event_will_contain_the_expected_ledgers_of_the_closed_account()
 {
     PublishedEvents.Last <ClosedAccountCreatedEvent>().Ledgers.Count().WillBe(4);
     PublishedEvents.Last <ClosedAccountCreatedEvent>().Ledgers[0].Key.WillBe("CreditMutation");
     PublishedEvents.Last <ClosedAccountCreatedEvent>().Ledgers[1].Key.WillBe("DebitMutation");
     PublishedEvents.Last <ClosedAccountCreatedEvent>().Ledgers[2].Key.WillBe("CreditTransfer");
     PublishedEvents.Last <ClosedAccountCreatedEvent>().Ledgers[3].Key.WillBe("DebitTransfer");
 }
 public void Then_a_money_transfer_event_will_be_published()
 {
     PublishedEvents.Last().WillBeOfType <MoneyTransferFailedEvent>();
 }
예제 #10
0
 public void Then_a_client_phone_number_changed_event_will_be_published()
 {
     PublishedEvents.Last().WillBeOfType <ClientPhoneNumberChangedEvent>();
 }
예제 #11
0
 public void Then_the_published_event_will_contain_the_name_of_the_client()
 {
     Assert.That(PublishedEvents.Last <CustomerCreatedEvent>().CustomerName == "Jörg Egretzberger");
 }
예제 #12
0
 public void Then_the_published_event_will_contain_the_expected_details_of_the_account()
 {
     PublishedEvents.Last <AccountToClientAssignedEvent>().AggregateId.WillBe(AggregateRoot.Id);
     PublishedEvents.Last <AccountToClientAssignedEvent>().AccountId.WillNotBe(Guid.Empty);
 }
예제 #13
0
 public void Then_the_published_event_will_contain_the_name_of_the_client()
 {
     PublishedEvents.Last <ProductCreatedEvent>().Name.WillBe("Test Product");
 }
예제 #14
0
 public void Then_a_product_created_event_will_be_published()
 {
     PublishedEvents.Last().WillBeOfType <ProductCreatedEvent>();
 }
 public Shared Event()
 {
     return((Shared)PublishedEvents.Last());
 }
 public void Then_a_document_shared_event_will_be_pulished()
 {
     Assert.AreEqual(typeof(Shared), PublishedEvents.Last().GetType());
 }
예제 #17
0
 public void Then_the_published_event_will_contain_the_new_phone_number_of_the_client()
 {
     PublishedEvents.Last <ClientPhoneNumberChangedEvent>().PhoneNumber.WillBe("95009937");
 }
 public void Then_the_published_event_will_contain_the_amount_and_new_account_balance()
 {
     PublishedEvents.Last <MoneyTransferFailedEvent>().Amount.WillBe(5.0M);
     PublishedEvents.Last <MoneyTransferFailedEvent>().Balance.WillBe(20.0M);
     PublishedEvents.Last <MoneyTransferFailedEvent>().TargetAccount.WillBe("0987654321");
 }
 public void Then_a_roast_schedule_is_created()
 {
     PublishedEvents.Should().NotBeNullOrEmpty();
     PublishedEvents.Last().Should().BeOfType <RoastScheduleCreatedEvent>();
     PublishedEvents.Last().As <RoastScheduleCreatedEvent>().RoastScheduleId.Should().Be(_roastScheduleId);
 }
 public void Then_a_client_name_changed_event_will_be_published()
 {
     PublishedEvents.Last().WillBeOfType <ClientNameChangedEvent>();
 }
예제 #21
0
 public void Then_the_published_event_will_contain_new_product_id()
 {
     PublishedEvents.Last <ProductCreatedEvent>().ProductId.WillNotBe(Guid.Empty);
 }
 public void Then_the_published_event_will_contain_the_new_name_of_the_client()
 {
     PublishedEvents.Last <ClientNameChangedEvent>().ClientName.WillBe("Mark Nijhof");
 }
예제 #23
0
 public void Then_an_account_to_client_assigned_event_will_be_published()
 {
     PublishedEvents.Last().WillBeOfType <AccountToClientAssignedEvent>();
 }
예제 #24
0
 public void Then_an_account_closed_event_will_be_published()
 {
     PublishedEvents.Last().WillBeOfType <AccountClosedEvent>();
 }
예제 #25
0
 public void Then_a_client_created_event_will_be_published()
 {
     Assert.AreEqual(typeof(CustomerCreatedEvent), PublishedEvents.Last().GetType());
 }
예제 #26
0
 public void Then_the_published_event_will_contain_the_phone_number_of_the_client()
 {
     PublishedEvents.Last <CustomerCreatedEvent>().PhoneNumber.Should().Be.EqualTo("01/123456");
 }
예제 #27
0
 public void Then_some_event_should_be_published()
 {
     PublishedEvents.Last().Should().BeAssignableTo <NameChangedEvent>();
 }
 public void Then_days_for_roast_schedule_are_chosen()
 {
     PublishedEvents.Last().Should().BeOfType<RoastScheduleRoastDaysChosenEvent>();
 }
예제 #29
0
 public void Then_a_roast_schedule_created_event_will_be_published()
 {
     PublishedEvents.Last().As <RoastScheduleCreatedEvent>().Id.Should().Be(Id);
 }
예제 #30
0
 public void Then_verify_name_property()
 {
     PublishedEvents.Last().As <NameChangedEvent>().Name.Should().Be(AggregateRoot.Name);
 }