예제 #1
0
        public void GetStoreList_test()
        {
            var api = new EtaSDKv2();

            api.GetStoreList(null, stores =>
            {
                if (stores == null || stores.Count == 0)
                {
                    TestCompleteWithErrorsUISafe("Stores is null or Empty");
                }
                TestCompleteUISafe();
            }, (error, uri) =>
            {
                TestCompleteWithErrorsUISafe(error.Message);
            });
        }
예제 #2
0
        public void GetOfferSearch_test()
        {
            var api = new EtaSDKv2();

            api.GetOfferSearch(null, "kaffe", offers =>
            {
                if (offers == null || offers.Count == 0)
                {
                    TestCompleteWithErrorsUISafe("Offer Search result is null or Empty");
                }
                TestCompleteUISafe();
            }, (error, uri) =>
            {
                TestCompleteWithErrorsUISafe(error.Message);
            });
        }
예제 #3
0
        public void GetCatalogList_test()
        {
            var api = new EtaSDKv2();

            api.GetCatalogList(null, catalogs =>
            {
                if (catalogs == null || catalogs.Count == 0)
                {
                    TestCompleteWithErrorsUISafe("Catalogs == null or empty");
                }
                foreach (var catalog in catalogs)
                {
                    if (catalog == null || catalog.Id == null)
                    {
                        TestCompleteWithErrorsUISafe("Catalog == null");
                    }

                    if (catalog.Store == null || catalog.Store.Id == null)
                    {
                        TestCompleteWithErrorsUISafe("Catalog.Store == null");
                    }

                    if (catalog.Store.Country == null || catalog.Store.Country.Alpha2 == null)
                    {
                        TestCompleteWithErrorsUISafe("Catalog.Store.Country == null");
                    }

                    if (catalog.Store.Dealer == null || catalog.Store.Dealer.Id == null)
                    {
                        TestCompleteWithErrorsUISafe("Catalog.Store.Dealer == null");
                    }

                    if (catalog.Store.Dealer.Branding == null || catalog.Store.Dealer.Branding.Color == null)
                    {
                        TestCompleteWithErrorsUISafe("Catalog.Store.Dealer.Branding == null");
                    }
                }

                TestCompleteUISafe();
            }, (error, uri) =>
            {
                var msg = error.Message;
                TestCompleteWithErrorsUISafe(msg);
            });
        }
예제 #4
0
        public void GetStoreInfo_test()
        {
            var api = new EtaSDKv2();

            api.GetStoreInfo(null, store =>
            {
                if (store == null || string.IsNullOrWhiteSpace(store.Id))
                {
                    TestCompleteWithErrorsUISafe("Store is null or Empty");
                }
                else
                {
                    TestCompleteUISafe();
                }
            }, error =>
            {
                TestCompleteWithErrorsUISafe(error.Message);
            });
        }
예제 #5
0
        public void GetCatalogInfo_test()
        {
            string id        = "1a94vO"; // Irma catalog id ?!
            string publicKey = "1a94vO"; // Irma publickey ?!
            var    api       = new EtaSDKv2();

            api.GetCatalogInfo(id, publicKey, catalog =>
            {
                if (catalog != null && string.IsNullOrWhiteSpace(catalog.Id))
                {
                    TestCompleteWithErrorsUISafe("catalog is null or empty");
                }
                else
                {
                    TestCompleteUISafe();
                }
            }, error =>
            {
                TestCompleteWithErrorsUISafe(error.Message);
            });
        }