Example #1
0
 public HttpResponseMessage Get(string calendarYear, [ModelBinder(typeof(Ints))] IEnumerable <int> courseId = null, [ModelBinder(typeof(Strings))] IEnumerable <string> coursePeriodId = null)
 {
     try
     {
         var result = DisciplineBusiness.Get(calendarYear, courseId, coursePeriodId);
         return(Request.CreateResponse(HttpStatusCode.OK, result));
     }
     catch (Exception exc)
     {
         var logId = LogBusiness.Error(exc);
         return(Request.CreateResponse(HttpStatusCode.InternalServerError, new ErrorModel(logId)));
     }
 }
        public void DisciplineGetTest()
        {
            var actual = DisciplineBusiness.Get("2017", Enumerable.Empty <int>(), Enumerable.Empty <string>());

            Assert.IsTrue(actual.Count() > 0);
        }