Beispiel #1
0
        public void GetPayingItemsForLastYear_ThrowsWebUiHelperException()
        {
            _payingItemService.Setup(m => m.GetList(It.IsAny <Expression <Func <PayingItem, bool> > >())).Throws <ServiceException>();
            var target = new ReportControllerHelper(null, _payingItemService.Object, null);

            target.GetPayingItemsForLastYear(new WebUser());
        }
Beispiel #2
0
        public void GetCategoriesByType_ThrowsWebuiHelperException()
        {
            _categoryService.Setup(m => m.GetList(It.IsAny <Expression <Func <Category, bool> > >())).Throws <ServiceException>();
            var target = new ReportControllerHelper(_categoryService.Object, null, null);

            target.GetCategoriesByType(new WebUser(), 1);
        }
Beispiel #3
0
        public void GetCategoriesByType_ThrowsWebUiHelperExceptionWithInnerServiceException()
        {
            _categoryService.Setup(m => m.GetList()).Throws <ServiceException>();
            var target = new ReportControllerHelper(_categoryService.Object, null, null);

            try
            {
                target.GetCategoriesByType(new WebUser(), 1);
            }
            catch (WebUiHelperException e)
            {
                Assert.IsInstanceOfType(e.InnerException, typeof(ServiceException));
            }
        }