public void GetEventTest() { EventCRUD eventService = new EventCRUD(new TestDataRepository()); eventService.AddEvent(17, DateTime.Now, false, 72, 4, 3); Assert.AreEqual(eventService.GetEvent(17).Amount, 72); eventService.DeleteEvent(17); }
public void AddEventTest() { EventCRUD eventService = new EventCRUD(new TestDataRepository()); Assert.IsTrue(eventService.AddEvent(1, DateTime.Now, true, 6, 1, 2)); Assert.IsTrue(eventService.DeleteEvent(1)); }
public void GetAllEventsTest() { EventCRUD eventService = new EventCRUD(new TestDataRepository()); eventService.AddEvent(1, DateTime.Now, false, 10, 1, 1); IEnumerable <EventDTO> events = eventService.GetAllEvents(); Assert.AreEqual(events.Count(), 1); Assert.AreEqual(events.ElementAt(0).Id, 1); eventService.DeleteEvent(1); }