public void GetEventTypes_GetAll_ShouldReturnListOfEventTypes() { using (var scope = _iContainer.BeginLifetimeScope(AppContextType.UnitTest.ToString())) { _iEventTypeDal = scope.Resolve <IEventTypeDal>(); var eventTypeList = _iEventTypeDal.GetEventTypes(); Assert.True(eventTypeList.Count > 0); } }
/// <summary> /// Fetch All EventType items from Database /// </summary> /// <returns>Json object</returns> public string GetEventTypes() { try { var eventTypeList = _iEventTypeDal.GetEventTypes(); return(JsonConvert.SerializeObject(eventTypeList)); } catch (Exception ex) { log.Error("Exception in Method GetEventTypes", ex); throw; } }