Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save stoolrossa/6087720 to your computer and use it in GitHub Desktop.
Save stoolrossa/6087720 to your computer and use it in GitHub Desktop.
[TestClass]
public class given_a_drink_order_when_the_customer_orders_at_sunday_626pm : DrinkOrderContext
{
private decimal result;
public override void When()
{
base.When();
// setup clock to be 6:26pm on Sunday 30th of the June 2013
this.clock.Setup(c => c.GetDateTimeNow()).Returns(new DateTime(2013, 06, 30, 18, 26, 00));
var checkout = new Checkout(this.drinksMenu.Object, this.clock.Object);
this.result = checkout.CalculateCost(this.orders);
}
[TestMethod]
public void then_the_cost_is_full_price()
{
Assert.AreEqual(this.fullPrice, this.result);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment