public void GetEventsTest() { TestUtils.AddEventToContext(context); var result = controller.GetEvents(string.Empty); Assert.AreEqual(1, result.Value.Count); }
public void GetEventTest() { var evt = TestUtils.AddEventToContext(context); var result = controller.GetEvent(context.events.First().id); Assert.AreEqual(evt.name, result.Value.name); }
public void DeleteEventTest() { TestUtils.AddEventToContext(context); var result = controller.DeleteEvent(context.events.First().id); Assert.AreEqual(0, context.events.Count()); Assert.AreEqual(200, ((StatusCodeResult)result).StatusCode); }
public void UpdateEventTest() { var evt = TestUtils.AddEventToContext(context); evt.name = "test event"; var result = controller.UpdateEvent(evt); Assert.AreEqual(evt.name, context.events.First().name); Assert.AreEqual(200, ((StatusCodeResult)result).StatusCode); }