Example #1
0
        public IQueryable <UserModel> Get()
        {
            var users       = _userQuery.Get();
            var resultModel = _mapper.Map <UserEntity, UserModel>(users);

            return(resultModel);
        }
        public IQueryable <UserModel> Get()
        {
            IQueryable <User>      result = _query.Get();
            IQueryable <UserModel> models = _mapper.Map <User, UserModel>(result);

            return(models);
        }
        public void GetShouldReturnAll()
        {
            _userList.Add(new User());
            var result = _query.Get();

            result.Count().Should().Be(1);
        }
Example #4
0
        public IQueryable <UserModel> Get()
        {
            var result = _userQueryProcessor.Get();

            var model = _autoMapper.Map <User, UserModel>(result);

            return(model);
        }
        public void GetMustReturnAllUsers()
        {
            // arrange
            _userList.Add(new UserEntity {
                Id = _currentUserEntity.Id
            });

            // act
            var result = _userQueryProcessor.Get().ToList();

            // assert
            result.Count().Should().Be(1);
            result[0].Id.Should().Be(_currentUserEntity.Id);
        }