Created
July 26, 2013 09:57
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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