public void AddOutingToRepoShouldIncreaseCountBy()
        {
            CompanyOuting outing = new CompanyOuting();
            bool          actual = _companyOutingRepo.AddCompOuting(outing);

            Assert.IsTrue(actual);
        }
Beispiel #2
0
        public void Arrange()
        {
            _repo    = new CompanyOuting();
            _content = new CompanyOuting(EventType.Golf, 20, DateTime.Now, 50, 450);

            _repo.AddOutingToList(_content);
        }
        public void SeedTest()
        {
            CompanyOuting outing = new CompanyOuting(EventType.AmusementPark, 4, "April 30", 4.00);

            _companyOutingRepo.AddCompOuting(outing);
            CompanyOuting outing1 = new CompanyOuting(EventType.Bowling, 3, "April 10", 4.00);

            _companyOutingRepo.AddCompOuting(outing1);
        }
Beispiel #4
0
        private void CreateNewOuting()
        {
            CompanyOuting newContent = new CompanyOuting();

            Console.WriteLine("Please enter the name for your outing:");
            newContent.TypeOfEvent =
                Console.WriteLine("Enter the number of attendees");
            newContent.NumberOfAttendees =
        }
Beispiel #5
0
        public void SetOuting()
        {
            CompanyOuting content = new CompanyOuting();

            content.TypeOfEvent = EventType.Golf;
            EventType expected = EventType.Golf;
            EventType actual   = content.TypeOfEvent;

            Assert.AreEqual(expected, actual);
        }
        public void SumAllOutingsShouldUpdateOutingTotal()
        {
            // test that the number of outings is greater than the original number after adding an outing or an attendee

            List <CompanyOuting> outingList = new List <CompanyOuting>();
            CompanyOuting        outing     = new CompanyOuting();

            double actual   = _companyOutingRepo.SumAllOutings(outing);
            double expected = outingList.Sum();

            Assert.AreNotEqual(expected, actual);
        }
Beispiel #7
0
        //update
        public void UpdateExistingContent(EventType originalTitle, CompanyOuting newContent)
        {
            CompanyOuting oldContent = NameOfOuting(originalTitle);

            if (oldContent != null)
            {
                oldContent.TypeOfEvent       = newContent.TypeOfEvent;
                oldContent.DateOfEvent       = newContent.DateOfEvent;
                oldContent.CostPerPerson     = newContent.CostPerPerson;
                oldContent.NumberOfAttendees = newContent.NumberOfAttendees;
                oldContent.TotalCostOfEvent  = newContent.TotalCostOfEvent;
            }
        }
Beispiel #8
0
        public bool RemoveOutingFromList(EventType eventTitle)
        {
            CompanyOuting content = NameOfOuting(eventTitle);

            if (content == null)
            {
                return(false);
            }

            int initialCount = _listOfOutings.Count;

            _listOfOutings.Remove(content);

            if (initialCount > _listOfOutings.Count)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Beispiel #9
0
 public void AddOutingToList(CompanyOuting content)
 {
     _listOfOutings.Add(content);
 }