public void MenuOutgo_RaisesWebUiException()
        {
            _service.Setup(m => m.GetListByTypeOfFlow(It.IsAny <IWorkingUser>(), It.IsAny <int>()))
            .Throws <ServiceException>();
            var target = new NavRightController(_service.Object, null);

            target.MenuOutgo(new WebUser());
        }
        public void GetOutgoBudget()
        {
            _service.Setup(m => m.GetListByTypeOfFlow(It.IsAny <IWorkingUser>(), It.IsAny <int>())).Returns(new List <PayingItem>());
            var target = new NavRightController(_service.Object, _dbHelper.Object);

            _dbHelper.Setup(m => m.GetSummForDay(It.IsAny <List <PayingItem> >())).Returns(1000);
            _dbHelper.Setup(m => m.GetSummForMonth(It.IsAny <List <PayingItem> >())).Returns(1500);
            _dbHelper.Setup(m => m.GetSummForWeek(It.IsAny <List <PayingItem> >())).Returns(1300);

            var result = ((PartialViewResult)target.MenuOutgo(new WebUser())).Model as BudgetModel;

            Assert.AreEqual(1000, result.Day);
            Assert.AreEqual(1300, result.Week);
            Assert.AreEqual(1500, result.Month);
        }