Exemplo n.º 1
0
        public void ACRSumamrySetup()
        {
            _acrDetails         = FakeDatabase.AcrList();
            _acrStatus          = FakeDatabase.StatusList();
            _UsersAssignedToACR = FakeDatabase.UserList();
            _assignees          = FakeDatabase.GetAssignees();

            _acrSumRepository.Setup(a => a.GetACRSummary(It.IsAny <int>())).Returns((int i) => _acrDetails.Where(x => x.ACRID == i).Single().Summary.ToString());
            _acrStatusRepository.Setup(a => a.GetACRStatus(It.IsAny <int>())).Returns((int i) => _acrStatus.Where(x => x.StatusId == _acrDetails.FirstOrDefault().StatusId).Single().StatusName.ToString());
            _acrAssignedToRepository.Setup(a => a.ACRAssignedTo(It.IsAny <int>())).Returns(() => _assignees.Where(a => a.UserId == _UsersAssignedToACR.FirstOrDefault().UserID).Select(s => s.User.FirstName + " " + s.User.LastName).ToList <string>());
            this._ACRRepository           = _acrSumRepository.Object;
            this._ACRStatusRepository     = _acrStatusRepository.Object;
            this._ACRAssignedToRepository = _acrAssignedToRepository.Object;
        }