Example #1
0
        public async Task GetAllGroupByPlaceTest()
        {
            _repoWrapper.Setup(r => r.Work.GetAllAsync(null, null)).ReturnsAsync(new List <Work>().AsQueryable());

            var service = new WorkService(_repoWrapper.Object, _mapper.Object);

            _mapper.Setup(x => x.Map <Work, WorkDTO>(It.IsAny <Work>())).Returns(new WorkDTO());
            // Act
            var result = await service.GetAllGroupByPlaceAsync();

            // Assert
            Assert.NotNull(result);
            Assert.IsAssignableFrom <IEnumerable <WorkDTO> >(result);
        }