Exemplo n.º 1
0
 static async Task<IEnumerable<CalonModel>> LoadData()
 {
     var pilkadaApi = new PilkadaAPI();
     var eventModels = pilkadaApi.EventList().response.data.FirstOrDefault();
     if ( eventModels == null)
         throw new Exception("Tidak ada Even Pilkada");
     var calonApi = new CalonAPI();
     await Task.Delay(100);
     return calonApi.List(eventModels.id).response.data;
 }
 public void ListTest()
 {
     var a = new CalonAPI();
     var b = a.List(new Guid("4105e8ef-29a1-5893-8103-cbd2c1e5fbaa"));
     Assert.AreEqual(3, b.response.count);
 }