public void AddOutingToRepoShouldIncreaseCountBy() { CompanyOuting outing = new CompanyOuting(); bool actual = _companyOutingRepo.AddCompOuting(outing); Assert.IsTrue(actual); }
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); }
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 = }
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); }
//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; } }
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); } }
public void AddOutingToList(CompanyOuting content) { _listOfOutings.Add(content); }