Skip to content

Instantly share code, notes, and snippets.

@pavsaund
Created October 19, 2016 11:41
Show Gist options
  • Save pavsaund/d52b9221f720d1afe083492af3599c73 to your computer and use it in GitHub Desktop.
Save pavsaund/d52b9221f720d1afe083492af3599c73 to your computer and use it in GitHub Desktop.
public class When_adding_a_cart_item
{
[SetUp]
public void Because_Customer_service_and_our_customer_journey_tracker_needs_trace_info()
{
_shoppingCart.AddCartItem(cartItem);
}
[Test]
public void It_sends_the_correct_message_to_the_event_aggregator
{
var messagePlaced = MessageHandler.Messages.FirstOrDefault(message => message.Type == CustomerActiom.CartItemAddedToCart);
Assert.NotNull(messagePlaced);
Assert.Equal(messagePlaced.Type, CustomerAction.CartItemAddedToCart);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment