public void AddOutingToList_ShouldGetNotNull() { DateTime date2 = new DateTime(2020, 6, 04); Outings newOuting = new Outings(OutingType.Bowling, 123, date2, 17.25); OutingsRepository repository = new OutingsRepository(); repository.AddOutingToList(newOuting); Outings contentFromList = repository.GetOutingByTypeDate(OutingType.Bowling, date2); Assert.IsNotNull(contentFromList); }
public void UpdateExistingOuting_ShouldMatchGivenBool(int attendees, bool shouldUpdate) { DateTime date1 = new DateTime(2020, 5, 17); Outings updateOuting = new Outings(OutingType.Golf, 72, date1, 22); _repo.UpdateExistingOuting(OutingType.Golf, date1, updateOuting); Outings updatedOutings = _repo.GetOutingByTypeDate(OutingType.Golf, date1); int actual = updatedOutings.NumAttendees; int possible = attendees; bool updated = false; if (actual == possible) { updated = true; } Assert.AreEqual(updated, shouldUpdate); }