Skip to content

Instantly share code, notes, and snippets.

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