public async Task GetAll_Cats_Successful() { var cats = await CatService.GetAll(); cats.Count().Should().BeGreaterThan(0); ApiClientMock.VerifyGetAll <Cat>(); }
public IEnumerable <Cat> GetAll() { var retorno = (_service.GetAll()); return(retorno); // para pegar todos os item do banco de dados }
private IServiceTest Execute() { using (var context = new CatSharpContext(base.Options)) { var service = new CatService(context); base.Result = service.GetAll(); } return(this); }
public async Task ShouldLoadAllCatsWithRank_WhenOptionsFilterApplyied() { using (var dbContext = DbContextFixture.GetDbContext()) { var service = new CatService(new HttpService(), dbContext, IConfigMock.GetCatsMock()); IList <Cat> cats = (await service.GetAll(new RequestOptions() { Count = 5, Offset = 0, EloFilter = new MinMaxFilter() { Min = 1200, Max = 1500 }, IncludeMatchHistory = true }).ConfigureAwait(false)).ToList(); Assert.NotNull(cats); Assert.NotEmpty(cats); Assert.True(cats.Count == 5); Assert.NotNull(cats[0].Rank); Assert.NotNull(cats[0].Informations); Assert.NotNull(cats[0].Informations.History); } }
public static IList <CatGetDto> GetAllExt(this CatService service) { return(service.GetAll()); }