示例#1
0
        public void TestTotalEventCost()
        {
            KomodoOutingRepository repoInfo    = new KomodoOutingRepository();
            KomodoOutings          productInfo = new KomodoOutings(EventType.Bowling, 6, new DateTime(2019 / 1 / 25), 25.50m, 220m);

            repoInfo.AddToEventList(productInfo);
            var actual = repoInfo.AllEventCostList();


            var expected = 373m;

            Assert.AreEqual(expected, actual);
        }
示例#2
0
        public void SpecificTypeAllCost()
        {
            KomodoOutingRepository repoInfo     = new KomodoOutingRepository();
            KomodoOutings          productInfo  = new KomodoOutings(EventType.Bowling, 6, new DateTime(2019 / 1 / 25), 25.50m, 220m);
            KomodoOutings          productInfo2 = new KomodoOutings(EventType.Bowling, 6, new DateTime(2019 / 1 / 25), 25.50m, 220m);

            repoInfo.EventCost(productInfo);
            repoInfo.EventCost(productInfo2);

            repoInfo.AddToEventList(productInfo);
            repoInfo.AddToEventList(productInfo2);

            repoInfo.SpecificEventCost(EventType.Bowling);

            var actual = repoInfo.AllEventCostList();


            var expected = 746m;

            Assert.AreEqual(expected, actual);
        }
示例#3
0
 private void DisplayCostOfAllOutings()
 {
     Console.WriteLine($"The total of all events is {_outingRepo.AllEventCostList()}");
     Console.ReadLine();
 }