Exemplo n.º 1
0
        public void B_GetCategoryTest()
        {
            workout_category wc = null;
            var catList         = workoutCategoryService.GetWorkoutCategories().Where(x => x.category_name.Equals("TestServicecategory", StringComparison.InvariantCultureIgnoreCase)).FirstOrDefault();

            if (catList != null)
            {
                wc = new workout_category();
                wc = workoutCategoryService.GetCategory(catList.category_id);
            }

            Assert.AreNotEqual(null, wc);
        }
        public HttpResponseMessage GetCategory(WorkoutCategory wc)
        {
            WorkoutCategory result = new WorkoutCategory();

            try
            {
                var res = _workoutCategoryService.GetCategory(wc.category_id);
                MapCategory(res, ref result);
            }
            catch (Exception ex)
            {
                _logManager.WriteLog(ex);
            }
            return(ToJson(result));
        }