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;
            }
        }
예제 #2
0
파일: Beers.cs 프로젝트: tukzar/BreweryDB
        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);
        }
예제 #3
0
파일: Beers.cs 프로젝트: Redth/BreweryDB
        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);

        }
예제 #4
0
        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);
        }
예제 #5
0
        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);
        }
예제 #6
0
        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);
        }
예제 #7
0
        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);
        }
예제 #8
0
 public FeatureResource(BreweryDbClient breweryDbClient)
 {
     client = breweryDbClient;
 }
예제 #9
0
 public BeerServices(BreweryDbClient breweryDbClient)
 {
     Client = breweryDbClient;
 }
 public AdjunctResource(BreweryDbClient breweryDbClient)
 {
     client = breweryDbClient;
 }
예제 #11
0
 public BeerResource(BreweryDbClient breweryDbClient)
 {
     client = breweryDbClient;
 }
예제 #12
0
 public SocialSiteResource(BreweryDbClient breweryDbClient)
 {
     client = breweryDbClient;
 }
예제 #13
0
 public GuildResource(BreweryDbClient breweryDbClient)
 {
     client = breweryDbClient;
 }
예제 #14
0
 public ChangeResource(BreweryDbClient breweryDbClient)
 {
     client = breweryDbClient;
 }
예제 #15
0
 public FluidSizeResource(BreweryDbClient breweryDbClient)
 {
     client = breweryDbClient;
 }
예제 #16
0
 public EventResource(BreweryDbClient breweryDbClient)
 {
     client = breweryDbClient;
 }
예제 #17
0
 public YeastResource(BreweryDbClient breweryDbClient)
 {
     client = breweryDbClient;
 }
 public FermentableResource(BreweryDbClient breweryDbClient)
 {
     client = breweryDbClient;
 }
예제 #19
0
 public CategoryResource(BreweryDbClient breweryDbClient)
 {
     client = breweryDbClient;
 }