public void Test_CreatingTwoEvents() { EventRepository evRep = EventRepository.getInstance(); Category cat = new Category("Sport"); Location loc1 = new Location("Poljud", "neka adresa", "neki opis"); Location loc2 = new Location("Maksimir", "neka adresa", "neki opis"); Event ev1 = new Event("Hajduk-Inter", "utakmica", 200, 10000, DateTime.Now.AddDays(5), cat, loc1); Event ev2 = new Event("Dinamo- Real Madrid", "utakmica", 500, 10000, DateTime.Now.AddDays(5), cat, loc2); evRep.addEvent(ev1); evRep.addEvent(ev2); Assert.AreEqual(2, evRep.Count()); }
public void AddEventTypesToList() { //arrange //add repo, make items, add to repo DateTime t1 = new DateTime(2018, 06, 4); EventRepository Repo = new EventRepository(); Event type = new Event(EventType.golf, 2, t1, 50); Repo.AddEventTypesToList(type); //act //expected, actual int Expected = 1; int Actual = Repo.Count(); //assert Assert.AreEqual(Expected, Actual); }