Exemplo n.º 1
0
        public void GivenValidData_WhenTopFifteenRecentExceptionsAreRetrieved_AndTheDatabaseIsNotAvailabe_ThenAnUnityExceptionIsThrown()
        {
            this._gridRunRepository.Setup(x => x.GetTopFifteenRecentExceptions(It.IsAny <List <int> >())).Throws <Exception>();
            Action act = () => _gridRunService.GetTopFifteenRecentExceptions();

            act.ShouldThrow <UnityException>();
        }
Exemplo n.º 2
0
        private void GetRecentExceptions(DashboardViewModel dashBoardViewModel)
        {
            IList <GridRun> recentExceptions;

            if (dashBoardViewModel.ManCosToFilter.Count > 0)
            {
                recentExceptions = _gridRunService.GetTopFifteenRecentExceptions(dashBoardViewModel.ManCosToFilter);
            }
            else
            {
                recentExceptions = _gridRunService.GetTopFifteenRecentExceptions();
            }
            dashBoardViewModel.AddExceptions(recentExceptions);
        }