public void TestEvent() { Eventual.Model.Event event2 = CreateEvent(); Assert.AreEqual(event2.EventID, 17); Assert.AreEqual(event2.EventTitle, "event1"); Assert.AreEqual(event2.EventPrice, 50); Assert.AreEqual(event2.EventDescription, "description"); Assert.AreEqual(event2.LocationID, 1020); Assert.AreEqual(event2.EventImageURL, "url"); }
public Eventual.Model.Event CreateEvent() { Eventual.Model.Event event1 = new Eventual.Model.Event(); event1.EventID = 17; event1.EventTitle = "event1"; event1.EventPrice = 50; event1.EventDescription = "description"; event1.LocationID = 1020; event1.EventImageURL = "url"; return(event1); }
public void TestEventRegistration() { Eventual.Model.EventRegistration revent = RegisterEvent(); Eventual.Model.User user = new Eventual.Model.User(); Eventual.Model.Event myevent = new Eventual.Model.Event(); Assert.AreEqual(revent.EventID, 2); Assert.AreEqual(revent.UserID, 20); Assert.AreNotEqual(revent.User, user); Assert.AreNotEqual(revent.Event, myevent); }
public Eventual.Model.SavedEvent CreateSavedEvent() { Eventual.Model.SavedEvent sevent = new Eventual.Model.SavedEvent(); Eventual.Model.Event n = new Eventual.Model.Event(); Eventual.Model.User u = new Eventual.Model.User(); sevent.Event = n; sevent.EventID = 1; sevent.User = u; sevent.UserID = 4; return(sevent); }
public void TestSavedEvent() { Eventual.Model.SavedEvent sevent = CreateSavedEvent(); Eventual.Model.Event n = new Eventual.Model.Event(); Eventual.Model.User u = new Eventual.Model.User(); Assert.AreEqual(sevent.EventID, 1); Assert.AreEqual(sevent.UserID, 4); Assert.IsNotNull(sevent.User); Assert.IsNotNull(sevent.Event); }
public Eventual.Model.EventRegistration RegisterEvent() { Eventual.Model.EventRegistration regevent = new Eventual.Model.EventRegistration(); Eventual.Model.User user = new Eventual.Model.User(); Eventual.Model.Event myevent = new Eventual.Model.Event(); regevent.EventID = 2; regevent.User = user; regevent.UserID = 20; regevent.Event = myevent; return(regevent); }
public async Task <IHttpActionResult> GetEvent(int id) { //local variables Eventual.DAL.Event @event = await db.Events.FindAsync(id); Eventual.Model.Event emEvent = null; if (@event == null) { return(NotFound()); } emEvent = ConvertModels.ConvertEntityToModel.EventEntityToEventModel(@event); return(Ok(emEvent)); }