コード例 #1
0
        public void EventRepo_CalculateByType_ShouldBeCorrect()
        {
            EventRepo eventRepo = new EventRepo();

            Event cost = new Event();

            cost.PerOutCost = 5m;
            cost.OutType    = OutType.APark;
            Event outing = new Event();

            outing.PerOutCost = 5m;
            outing.OutType    = OutType.APark;
            Event outingTwo = new Event();

            outingTwo.PerOutCost = 5m;

            eventRepo.AddEventToList(cost);
            eventRepo.AddEventToList(outing);
            eventRepo.AddEventToList(outingTwo);

            decimal actual   = eventRepo.CalculateByType(OutType.APark);
            decimal expected = 10m;

            Assert.AreEqual(expected, actual);
        }