protected async override void OnAppearing() { BreweryDbClient client = new BreweryDbClient("a956af587b434c4c89ef18c7bbd2fac9"); var response = await client.Features.Get(DateTime.Today); if (response != null && response.Status == "success") { feature = response.Data; BindingContext = feature.Beer; } }
public async Task CustomType() { var newClient = new BreweryDbClient(Keys.ApplicationKey); var Beers = new BeerResource <MyBeer>(newClient); var response = await Beers.GetAll(); Assert.IsTrue(response.Status == "success"); Assert.IsTrue(response.CurrentPage == 1); Assert.IsTrue(response.NumberOfPages >= 1); Assert.IsTrue(response.TotalResults >= 1019); }
public async Task CustomType() { var newClient = new BreweryDbClient(Keys.ApplicationKey); var Beers = new BeerResource<MyBeer>(newClient); var response = await Beers.GetAll(); Assert.IsTrue(response.Status == "success"); Assert.IsTrue(response.CurrentPage == 1); Assert.IsTrue(response.NumberOfPages >= 1); Assert.IsTrue(response.TotalResults >= 1019); }
public async Task GetAll_Should_Success_Return_FirstPage() { //Arrange var client = new BreweryDbClient(Config.AppKey); var beerServices = new BeerServices(client); //Act var response = await beerServices.GetAll(); //Assert Assert.IsTrue(response.Status == "success"); Assert.IsTrue(response.CurrentPage == 1); }
public async Task GetAll_With_PageNumber_Should_Return_Right_Page() { //Arrange var client = new BreweryDbClient(Config.AppKey); var beerServices = new BeerServices(client); int pageNumber = 3; //Act var response = await beerServices.GetAll(pageNumber); //Assert Assert.IsTrue(response.Status == "success"); Assert.IsTrue(response.CurrentPage == pageNumber); }
public async Task GetDetailsByID_Should_Return_Correct_Beer() { //Arrange var client = new BreweryDbClient(Config.AppKey); var beerServices = new BeerServices(client); string beerId = "eqcXWb"; //Act var response = await beerServices.GetDetailsByID(beerId); var beer = response.Data; //Assert Assert.IsTrue(response.Status == "success"); Assert.IsNotNull(beer); Assert.AreEqual(beer.Id, beerId); }
public async Task Search_Should_Return_Correct_Results() { //Arrange var client = new BreweryDbClient(Config.AppKey); var beerServices = new BeerServices(client); string keyword = "london"; //Act var response = await beerServices.Search(keyword); var beers = response.Data; //Assert Assert.IsTrue(response.Status == "success"); Assert.IsTrue(response.CurrentPage == 1); Assert.IsTrue(response.NumberOfPages >= 1); Assert.IsTrue(beers.Count >= 1); }
public FeatureResource(BreweryDbClient breweryDbClient) { client = breweryDbClient; }
public BeerServices(BreweryDbClient breweryDbClient) { Client = breweryDbClient; }
public AdjunctResource(BreweryDbClient breweryDbClient) { client = breweryDbClient; }
public BeerResource(BreweryDbClient breweryDbClient) { client = breweryDbClient; }
public SocialSiteResource(BreweryDbClient breweryDbClient) { client = breweryDbClient; }
public GuildResource(BreweryDbClient breweryDbClient) { client = breweryDbClient; }
public ChangeResource(BreweryDbClient breweryDbClient) { client = breweryDbClient; }
public FluidSizeResource(BreweryDbClient breweryDbClient) { client = breweryDbClient; }
public EventResource(BreweryDbClient breweryDbClient) { client = breweryDbClient; }
public YeastResource(BreweryDbClient breweryDbClient) { client = breweryDbClient; }
public FermentableResource(BreweryDbClient breweryDbClient) { client = breweryDbClient; }
public CategoryResource(BreweryDbClient breweryDbClient) { client = breweryDbClient; }