Inheritance: PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo.PhoneCallCosting
Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }