Esempio n. 1
0
        public async Task GetDecisionListTest_ReturnDecisionList()
        {
            //Arrange
            _repository.Setup(rep => rep.Decesion.GetAllAsync(It.IsAny <Expression <Func <Decesion, bool> > >(),
                                                              It.IsAny <Func <IQueryable <Decesion>, IIncludableQueryable <Decesion, object> > >()))
            .ReturnsAsync(GetTestDecesionQueryable().AsEnumerable);

            //Act
            var decision = (await _decisionService.GetDecisionListAsync()).ToList();

            //Assert
            Assert.IsInstanceOf <List <DecisionWrapperDTO> >(decision);
        }
Esempio n. 2
0
        public async Task GetDecisionListCountTest()
        {
            _decisionService = CreateDecisionService();
            _repository.Setup(rep => rep.Decesion.GetAllAsync(It.IsAny <Expression <Func <Decesion, bool> > >(),
                                                              It.IsAny <Func <IQueryable <Decesion>, IIncludableQueryable <Decesion, object> > >()))
            .ReturnsAsync(GetTestDecesionQueryable());
            var decision = (await _decisionService.GetDecisionListAsync()).ToList();

            Assert.Equal(GetTestDecisionsDtoList().Count, decision.Count);
        }
Esempio n. 3
0
        public async Task GetDecisionListTest()
        {
            _decisionService = CreateDecisionService();
            _repository.Setup(rep => rep.Decesion.GetAllAsync(It.IsAny <Expression <Func <Decesion, bool> > >(),
                                                              It.IsAny <Func <IQueryable <Decesion>, IIncludableQueryable <Decesion, object> > >()))
            .ReturnsAsync(GetTestDecesionQueryable().AsEnumerable);

            var decision = (await _decisionService.GetDecisionListAsync()).ToList();

            Assert.IsType <List <DecisionWrapperDTO> >(decision);
        }