예제 #1
0
        public void RuleServiceTest_Get_count()
        {
            var expected = rep.GetAll().Count();
            var actual   = service.GetAll().Count();

            Assert.AreEqual(expected, actual);
        }
예제 #2
0
        public void RuleControllerTest_GetAllRules()
        {
            var expected = service.GetAll();
            var actual   = controller.GetAllRules();

            Assert.AreEqual(expected.Count(), actual.Count());
        }
예제 #3
0
        public IActionResult Get()
        {
            AppLogger.LogResourceRequest(nameof(Get), base.GetUsernameForRequest());

            try
            {
                return(Ok(_ruleService.GetAll()));
            }
            catch (Exception ex)
            {
                return(BadRequestExceptionHandler(ex, nameof(Get)));
            }
        }
예제 #4
0
 public IQueryable <RuleModel> GetAllRules()
 {
     return(service.GetAll());
 }