private void SimulateCustomerActivityFor3rdJune() { // quiet normal day var startOfDay = new DateTime(2014, 06, 03); account1.TopUp(new Money(5), TestClock(startOfDay.AddHours(10))); account1.Record(PhoneCall(startOfDay.AddHours(10.5), 5), Cost(), null); account1.Record(PhoneCall(startOfDay.AddHours(20), 10), Cost(), null); account4.TopUp(new Money(10), TestClock(startOfDay.AddHours(18))); account4.Record(PhoneCall(startOfDay.AddHours(18.1), 7), Cost(), null); }
private void SimulateCustomerActivityFor4thJune() { // Day of the big marketing promotion var startOfDay = new DateTime(2014, 06, 04); var freeCalls = new FreePhoneCallCosting(); account1.TopUp(new Money(20), TestClock(startOfDay.AddHours(9.5))); account1.Record(PhoneCall(startOfDay.AddHours(10), 22), freeCalls, null); account1.Record(PhoneCall(startOfDay.AddHours(10.5), 15), freeCalls, null); account1.Record(PhoneCall(startOfDay.AddHours(12.75), 45), freeCalls, null); account1.Record(PhoneCall(startOfDay.AddHours(18.75), 5), freeCalls, null); account1.Record(PhoneCall(startOfDay.AddHours(19.0), 7), freeCalls, null); account2.TopUp(new Money(20), TestClock(startOfDay.AddHours(6.5))); account2.Record(PhoneCall(startOfDay.AddHours(19), 120), freeCalls, null); account3.TopUp(new Money(20), TestClock(startOfDay.AddHours(21.25))); account3.Record(PhoneCall(startOfDay.AddHours(21.25), 24), freeCalls, null); account3.Record(PhoneCall(startOfDay.AddHours(23.5), 28), freeCalls, null); account4.TopUp(new Money(20), TestClock(startOfDay.AddHours(18.75))); account4.Record(PhoneCall(startOfDay.AddHours(19.0), 13), freeCalls, null); account4.Record(PhoneCall(startOfDay.AddHours(19.25), 19), freeCalls, null); account4.Record(PhoneCall(startOfDay.AddHours(20), 7), freeCalls, null); account4.Record(PhoneCall(startOfDay.AddHours(19.0), 13), freeCalls, null); account5.TopUp(new Money(20), TestClock(startOfDay.AddHours(23))); account5.Record(PhoneCall(startOfDay.AddHours(23.1), 35), freeCalls, null); }
[ClassInitialize] // runs first public static void When_applying_a_top_up_that_does_not_qualify_for_inclusive_minutes(TestContext ctx) { _account = new PayAsYouGoAccount(Guid.NewGuid(), new Money(0)); // remove the AccountCreated event that is not relevant to this test _account.Changes.Clear(); _account.AddInclusiveMinutesOffer(_free90MinsWith10DollarTopUp); _account.TopUp(_fiveDollars, new SystemClock()); // $5 top up does not meet $10 threshold for free minutes }