Esempio n. 1
0
 public void CostByType()
 {
     Console.WriteLine($"Annual Golf Outings Cost: ${_outingRepo.CostByType(EventType.Golf)} \n" +
                       $"Annual Bowling Outings Cost: ${_outingRepo.CostByType(EventType.Bowling)}\n" +
                       $"Annual Amusement Park Outings Cost: ${_outingRepo.CostByType(EventType.AmusementPark)}\n" +
                       $"Annual Concert Outings Cost: ${_outingRepo.CostByType(EventType.Concert)}");
 }
Esempio n. 2
0
        public void CostByType()
        {
            //arrange
            _repo.Seed();
            Outing GolfDay   = new Outing(EventType.Golf, 20, new DateTime(2019, 08, 14), 20d, 400d);
            Outing GolfNight = new Outing(EventType.Golf, 10, new DateTime(2019, 08, 15), 20d, 200d);

            //act
            _repo.AddNewOuting(GolfDay);
            _repo.AddNewOuting(GolfNight);
            double golfTotal = _repo.CostByType(EventType.Golf);

            //assert
            Assert.AreEqual(600d, golfTotal);
        }