Exemplo n.º 1
0
        public void TestAdd()
        {
            Outing_Repository outingRepo = new Outing_Repository();
            Outing            newOuting  = new Outing(OutingType.Bowling, 2, new DateTime(12, 12, 12), 2.00d, 2000d);
            Outing            newOuting2 = new Outing(OutingType.Bowling, 2, new DateTime(12, 12, 12), 2.00d, 2000d);

            outingRepo.AddToList(newOuting);
            outingRepo.AddToList(newOuting2);
            List <Outing> list = outingRepo.GetOutingList();

            int actual   = list.Count;
            int expected = 2;

            Assert.AreEqual(expected, actual);
            Assert.IsTrue(list.Contains(newOuting));

            Console.WriteLine($"{expected} = {actual}");
        }
Exemplo n.º 2
0
        public void AddOutingToList(OutingType outingType, int numberAttended, DateTime dateOfOuting, double costPerPerson, double totalCostOfEvent)
        {
            Outing newOuting = new Outing(outingType, numberAttended, dateOfOuting, costPerPerson, totalCostOfEvent);

            _outingRepo.AddToList(newOuting);
        }