예제 #1
0
        public void GivenValidData_WhenTheFifteenMostRecentProcessedGridRunsAreRetrieved_AndTheDatabaseIsNotAvailabe_ThenAnUnityExceptionIsThrown()
        {
            this._gridRunRepository.Setup(x => x.GetTopFifteenSuccessfullyCompleted(It.IsAny <List <int> >())).Throws <Exception>();
            Action act = () => _gridRunService.GetTopFifteenSuccessfullyCompleted();

            act.ShouldThrow <UnityException>();
        }
예제 #2
0
        private void GetRecentlyProcessed(DashboardViewModel dashBoardViewModel)
        {
            IList <GridRun> recentlyProcessed;

            if (dashBoardViewModel.ManCosToFilter.Count > 0)
            {
                recentlyProcessed = _gridRunService.GetTopFifteenSuccessfullyCompleted(dashBoardViewModel.ManCosToFilter);
            }
            else
            {
                recentlyProcessed = _gridRunService.GetTopFifteenSuccessfullyCompleted();
            }
            dashBoardViewModel.AddRecent(recentlyProcessed);
        }