public void A_book_sold_should_generate_the_shipping_label_with_tax_information() { var order = new Order(_customer, _address); order.AddProduct(_book); const string expectedTaxInfo = "Item isento de impostos conforme disposto na ConstituiĆ§Ć£o Art. 150, VI, d."; order.Pay(_paymentMethod); Assert.Equal(order.ShippingLabel, new ShippingLabel(expectedTaxInfo, order.Payment.Invoice.ShippingAddress)); _domainEventNotifier.Received(1) .NotifyAbout(Arg.Is <DomainEvent>(@event => @event is BookSold)); }
public void Should_notify_the_customer_that_his_membership_was_activated() { var customer = new Customer(Mail); var membership = new Membership("Premium membership"); customer.ActivateMembership(membership); _domainEventNotifier .Received().NotifyAbout(Arg.Is <DomainEvent>(@event => @event is MembershipActivated)); }