Beispiel #1
0
        public async Task GetClubsListAsync()
        {
            // Act
            PagedResultDto<ClubPlayerListDto> result = await _playersAppService.GetClubsListAsync(
                Guid.Parse("85ea0ccf-0fad-4c6f-b660-23e6004a777d"),
                new GetClubPlayersInput());

            // Assert
            result.TotalCount.ShouldBe(2);
            result.Items.Count.ShouldBe(2);
            result.Items.Any(x => x.Id == Guid.Parse("d6f4c147-22a2-475b-80bb-bacf18d08ce2")).ShouldBe(true);
            result.Items.Any(x => x.Id == Guid.Parse("2bbaae46-29fe-4b1c-99f8-63a9296204cf")).ShouldBe(true);

            ClubPlayerListDto clubPlayerListDto = result.Items.First(x => x.Id == Guid.Parse("d6f4c147-22a2-475b-80bb-bacf18d08ce2"));
            clubPlayerListDto.Id.ShouldBe(Guid.Parse("d6f4c147-22a2-475b-80bb-bacf18d08ce2"));
            clubPlayerListDto.Club.Id.ShouldBe(Guid.Parse("d772238a-9871-47d7-84d5-c45083799954"));
            clubPlayerListDto.Club.Name.ShouldBe("Snooker Club 1");
            clubPlayerListDto.IsPrimaryClubOfPlayer.ShouldBeTrue();
        }
 public virtual Task <PagedResultDto <ClubPlayerListDto> > GetClubsListAsync(Guid id, GetClubPlayersInput input)
 {
     return(_playersAppService.GetClubsListAsync(id, input));
 }