예제 #1
0
        public async Task GetAllAsync_ReturnsAllClubs()
        {
            // Arrange
            _repoWrapper.Setup(rw => rw.Club.GetAllAsync(It.IsAny <Expression <Func <DataAccessClub.Club, bool> > >(),
                                                         It.IsAny <Func <IQueryable <DataAccessClub.Club>, IIncludableQueryable <DataAccessClub.Club, object> > >()))
            .ReturnsAsync(() => new List <DataAccessClub.Club>());

            // Act
            var result = await _clubService.GetAllAsync();

            // Assert
            Assert.NotNull(result);
            Assert.IsInstanceOf <List <DataAccessClub.Club> >(result);
        }
예제 #2
0
        public async Task GetAllTest()
        {
            ClubService ClubService = CreateClubService();

            var result = await ClubService.GetAllAsync();

            Assert.NotNull(result);
        }
예제 #3
0
 private Task<IEnumerable<ClubDto>> GetClubsAsync()
 {
     return _service.GetAllAsync();
 }