Esempio n. 1
0
        public async Task GetDecisionTargetListAsyncTest()
        {
            _decisionService = CreateDecisionService();
            List <DecisionTargetDTO> decisionTargets = GetTestDecisionTargetsDtoList();

            _repository.Setup(rep => rep.DecesionTarget.GetAllAsync(It.IsAny <Expression <Func <DecesionTarget, bool> > >(),
                                                                    It.IsAny <Func <IQueryable <DecesionTarget>, IIncludableQueryable <DecesionTarget, object> > >())).ReturnsAsync(new List <DecesionTarget>());

            var actualReturn = await _decisionService.GetDecisionTargetListAsync();

            Assert.Equal(decisionTargets.Aggregate("", (x, y) => x += y.TargetName), actualReturn.Aggregate("", (x, y) => x += y.TargetName));
        }