예제 #1
0
 /// <remarks/>
 public System.IAsyncResult Beginupdate(TUpdateShop ShopData, System.AsyncCallback callback, object asyncState)
 {
     return(this.BeginInvoke("update", new object[] {
         ShopData
     }, callback, asyncState));
 }
예제 #2
0
 public void update(TUpdateShop ShopData)
 {
     this.Invoke("update", new object[] {
         ShopData
     });
 }
예제 #3
0
 public void update(TUpdateShop ShopData) {
     this.Invoke("update", new object[] {
                 ShopData});
 }
예제 #4
0
 /// <remarks/>
 public System.IAsyncResult Beginupdate(TUpdateShop ShopData, System.AsyncCallback callback, object asyncState) {
     return this.BeginInvoke("update", new object[] {
                 ShopData}, callback, asyncState);
 }
		public void TestSuite() 
		{
            Console.WriteLine("Test TestSuite");

			// create a shop
            EpagesProviderWebServices.SimpleProvisioningServiceRef.TCreateShop Shop_create = new EpagesProviderWebServices.SimpleProvisioningServiceRef.TCreateShop();
			Shop_create.Alias = ALIAS;
			Shop_create.ShopType = "ECom100";
            Shop_create.IsClosedSpecified = true;
            Shop_create.IsClosed = false;
            Shop_create.IsTrialShopSpecified = true;
            Shop_create.IsTrialShop = true;
            Shop_create.IsInternalTestShopSpecified = false;
            Shop_create.IsInternalTestShop = false;
            Shop_create.DomainName = "mydomain.com";
            Shop_create.HasSSLCertificateSpecified = true;
            Shop_create.HasSSLCertificate = false;
            Shop_create.MerchantLogin = "******";
            Shop_create.MerchantPassword = "******";
            Shop_create.MerchantEMail = "*****@*****.**";

			Console.WriteLine("simpleProvisioningService.create");
			simpleProvisioningService.create(Shop_create);

			// test if a shop exists
            EpagesProviderWebServices.SimpleProvisioningServiceRef.TShopRef shopRef = new EpagesProviderWebServices.SimpleProvisioningServiceRef.TShopRef();
			shopRef.Alias = ALIAS;

			Console.WriteLine("simpleProvisioningService.exists");
			bool exists = simpleProvisioningService.exists(shopRef);
			
			Assert.IsTrue(exists, "exists?");

			// get information about a shop
            Console.WriteLine("simpleProvisioningService.getInfo");
            EpagesProviderWebServices.SimpleProvisioningServiceRef.TInfoShop Shop_out = simpleProvisioningService.getInfo(shopRef);

            Assert.AreEqual(Shop_create.Alias, Shop_out.Alias, "Alias");
            Assert.AreEqual(Shop_create.ShopType, Shop_out.ShopType, "ShopType");
            Assert.AreEqual(DATABASE, Shop_out.Database, "Database");
            Assert.AreEqual(Shop_create.DomainName, Shop_out.DomainName, "DomainName");
            Assert.AreEqual(Shop_create.HasSSLCertificate, Shop_out.HasSSLCertificate, "HasSSLCertificate");
            Assert.IsFalse(Shop_out.IsDeleted, "IsDeleted");
            Assert.AreEqual(Shop_create.IsTrialShop, Shop_out.IsTrialShop, "IsTrialShop");
            Assert.AreEqual(Shop_create.IsInternalTestShop, Shop_out.IsInternalTestShop, "IsInternalTestShop");
            Assert.AreEqual(Shop_create.MerchantLogin, Shop_out.MerchantLogin, "MerchantLogin");
            Assert.AreEqual(Shop_create.MerchantEMail, Shop_out.MerchantEMail, "MerchantEMail");
            Assert.AreEqual(Shop_out.LastMerchantLoginDate, new DateTime(1,1,1), "LastMerchantLoginDate");
            Assert.IsFalse(Shop_out.IsMarkedForDel, "IsMarkedForDel");
            Assert.AreEqual("http://" + Shop_create.DomainName + "/epages/" + ALIAS + ".sf", Shop_out.StorefrontURL, "StorefrontURL");
            Assert.IsTrue(Shop_out.BackofficeURL.EndsWith("://" + Shop_create.DomainName + "/epages/" + ALIAS + ".admin"), "BackofficeURL");
            
            // update the shop
            EpagesProviderWebServices.SimpleProvisioningServiceRef.TUpdateShop Shop_update = new EpagesProviderWebServices.SimpleProvisioningServiceRef.TUpdateShop();
			Shop_update.Alias = ALIAS;
            Shop_update.ShopType = "ECom1000";
            Shop_update.IsClosed = true;
            Shop_update.IsClosedSpecified = true;
            Shop_update.IsTrialShopSpecified = true;
            Shop_update.IsTrialShop = false;
            Shop_update.IsInternalTestShopSpecified = true;
            Shop_update.IsInternalTestShop = true;
            Shop_update.DomainName = "yourdomain.com";
            Shop_update.MerchantLogin = "******";
            Shop_update.MerchantPassword = "******";
            Shop_update.MerchantEMail = "*****@*****.**";

			Console.WriteLine("simpleProvisioningService.update");
			simpleProvisioningService.update(Shop_update);

			Console.WriteLine("simpleProvisioningService.getInfo");
            Shop_out = simpleProvisioningService.getInfo(shopRef);

			Assert.AreEqual(Shop_update.ShopType, Shop_out.ShopType, "updated ShopType");
			Assert.AreEqual(Shop_update.IsTrialShop, Shop_out.IsTrialShop, "updated IsTrialShop");
			Assert.AreEqual(Shop_update.IsInternalTestShop, Shop_out.IsInternalTestShop, "updated IsInternalTestShop");
			Assert.AreEqual(Shop_update.DomainName, Shop_out.DomainName, "updated DomainName");
            Assert.AreEqual(DATABASE, Shop_out.Database, "updated Database");
            Assert.AreEqual(Shop_update.MerchantLogin, Shop_out.MerchantLogin, "updated MerchantLogin");
            Assert.AreEqual(Shop_update.MerchantEMail, Shop_out.MerchantEMail, "updated MerchantEMail");
            Assert.IsFalse(Shop_out.IsMarkedForDel);
            Assert.AreEqual("http://" + Shop_update.DomainName + "/epages/" + ALIAS + ".sf", Shop_out.StorefrontURL, "updated StorefrontURL");

            // rename
            EpagesProviderWebServices.SimpleProvisioningServiceRef.TRename_Input Shop_rename = new EpagesProviderWebServices.SimpleProvisioningServiceRef.TRename_Input();
            Shop_rename.Alias = ALIAS;
            Shop_rename.NewAlias = NEW_ALIAS;

            Console.WriteLine("simpleProvisioningService.rename");
            simpleProvisioningService.rename(Shop_rename);

            EpagesProviderWebServices.SimpleProvisioningServiceRef.TShopRef shopRefNew = new EpagesProviderWebServices.SimpleProvisioningServiceRef.TShopRef();
            shopRefNew.Alias = NEW_ALIAS;

            Console.WriteLine("simpleProvisioningService.exists");
            exists = simpleProvisioningService.exists(shopRef);
            Assert.IsFalse(exists, "old alias no longer exists");

            Console.WriteLine("simpleProvisioningService.exists");
            exists = simpleProvisioningService.exists(shopRefNew);
            Assert.IsTrue(exists, "new alias exists");

            Console.WriteLine("simpleProvisioningService.getInfo");
            Shop_out = simpleProvisioningService.getInfo(shopRefNew);

            Assert.AreEqual(NEW_ALIAS, Shop_out.Alias, "renamed ShopRefAlias");
            Assert.AreEqual("http://" + Shop_update.DomainName + "/epages/" + NEW_ALIAS + ".sf", Shop_out.StorefrontURL, "renamed StorefrontURL");

			// mark the shop for deletion
            Console.WriteLine("simpleProvisioningService.markForDeletion");
			simpleProvisioningService.markForDeletion(shopRefNew);

			Console.WriteLine("simpleProvisioningService.exists");
            exists = simpleProvisioningService.exists(shopRefNew);
			Assert.IsTrue(exists, "shop still exists");

			Console.WriteLine("simpleProvisioningService.getInfo");
            Shop_out = simpleProvisioningService.getInfo(shopRefNew);
            Assert.IsTrue(Shop_out.IsClosed, "deleted IsClosed");
            Assert.IsFalse(Shop_out.IsDeleted, "deleted IsDeleted");
            Assert.IsTrue(Shop_out.IsMarkedForDel, "deleted IsMarkedForDel");

            deleteIfExists(NEW_ALIAS);
        }
예제 #6
0
        public void TestSuite()
        {
            Console.WriteLine("Test TestSuite");

            // create a shop
            EpagesProviderWebServices.SimpleProvisioningServiceRef.TCreateShop Shop_create = new EpagesProviderWebServices.SimpleProvisioningServiceRef.TCreateShop();
            Shop_create.Alias                       = ALIAS;
            Shop_create.ShopType                    = "ECom100";
            Shop_create.IsClosedSpecified           = true;
            Shop_create.IsClosed                    = false;
            Shop_create.IsTrialShopSpecified        = true;
            Shop_create.IsTrialShop                 = true;
            Shop_create.IsInternalTestShopSpecified = false;
            Shop_create.IsInternalTestShop          = false;
            Shop_create.DomainName                  = "mydomain.com";
            Shop_create.HasSSLCertificateSpecified  = true;
            Shop_create.HasSSLCertificate           = false;
            Shop_create.MerchantLogin               = "******";
            Shop_create.MerchantPassword            = "******";
            Shop_create.MerchantEMail               = "*****@*****.**";

            Console.WriteLine("simpleProvisioningService.create");
            simpleProvisioningService.create(Shop_create);

            // test if a shop exists
            EpagesProviderWebServices.SimpleProvisioningServiceRef.TShopRef shopRef = new EpagesProviderWebServices.SimpleProvisioningServiceRef.TShopRef();
            shopRef.Alias = ALIAS;

            Console.WriteLine("simpleProvisioningService.exists");
            bool exists = simpleProvisioningService.exists(shopRef);

            Assert.IsTrue(exists, "exists?");

            // get information about a shop
            Console.WriteLine("simpleProvisioningService.getInfo");
            EpagesProviderWebServices.SimpleProvisioningServiceRef.TInfoShop Shop_out = simpleProvisioningService.getInfo(shopRef);

            Assert.AreEqual(Shop_create.Alias, Shop_out.Alias, "Alias");
            Assert.AreEqual(Shop_create.ShopType, Shop_out.ShopType, "ShopType");
            Assert.AreEqual(DATABASE, Shop_out.Database, "Database");
            Assert.AreEqual(Shop_create.DomainName, Shop_out.DomainName, "DomainName");
            Assert.AreEqual(Shop_create.HasSSLCertificate, Shop_out.HasSSLCertificate, "HasSSLCertificate");
            Assert.IsFalse(Shop_out.IsDeleted, "IsDeleted");
            Assert.AreEqual(Shop_create.IsTrialShop, Shop_out.IsTrialShop, "IsTrialShop");
            Assert.AreEqual(Shop_create.IsInternalTestShop, Shop_out.IsInternalTestShop, "IsInternalTestShop");
            Assert.AreEqual(Shop_create.MerchantLogin, Shop_out.MerchantLogin, "MerchantLogin");
            Assert.AreEqual(Shop_create.MerchantEMail, Shop_out.MerchantEMail, "MerchantEMail");
            Assert.AreEqual(Shop_out.LastMerchantLoginDate, new DateTime(1, 1, 1), "LastMerchantLoginDate");
            Assert.IsFalse(Shop_out.IsMarkedForDel, "IsMarkedForDel");
            Assert.AreEqual("http://" + Shop_create.DomainName + "/epages/" + ALIAS + ".sf", Shop_out.StorefrontURL, "StorefrontURL");
            Assert.IsTrue(Shop_out.BackofficeURL.EndsWith("://" + Shop_create.DomainName + "/epages/" + ALIAS + ".admin"), "BackofficeURL");

            // update the shop
            EpagesProviderWebServices.SimpleProvisioningServiceRef.TUpdateShop Shop_update = new EpagesProviderWebServices.SimpleProvisioningServiceRef.TUpdateShop();
            Shop_update.Alias                       = ALIAS;
            Shop_update.ShopType                    = "ECom1000";
            Shop_update.IsClosed                    = true;
            Shop_update.IsClosedSpecified           = true;
            Shop_update.IsTrialShopSpecified        = true;
            Shop_update.IsTrialShop                 = false;
            Shop_update.IsInternalTestShopSpecified = true;
            Shop_update.IsInternalTestShop          = true;
            Shop_update.DomainName                  = "yourdomain.com";
            Shop_update.MerchantLogin               = "******";
            Shop_update.MerchantPassword            = "******";
            Shop_update.MerchantEMail               = "*****@*****.**";

            Console.WriteLine("simpleProvisioningService.update");
            simpleProvisioningService.update(Shop_update);

            Console.WriteLine("simpleProvisioningService.getInfo");
            Shop_out = simpleProvisioningService.getInfo(shopRef);

            Assert.AreEqual(Shop_update.ShopType, Shop_out.ShopType, "updated ShopType");
            Assert.AreEqual(Shop_update.IsTrialShop, Shop_out.IsTrialShop, "updated IsTrialShop");
            Assert.AreEqual(Shop_update.IsInternalTestShop, Shop_out.IsInternalTestShop, "updated IsInternalTestShop");
            Assert.AreEqual(Shop_update.DomainName, Shop_out.DomainName, "updated DomainName");
            Assert.AreEqual(DATABASE, Shop_out.Database, "updated Database");
            Assert.AreEqual(Shop_update.MerchantLogin, Shop_out.MerchantLogin, "updated MerchantLogin");
            Assert.AreEqual(Shop_update.MerchantEMail, Shop_out.MerchantEMail, "updated MerchantEMail");
            Assert.IsFalse(Shop_out.IsMarkedForDel);
            Assert.AreEqual("http://" + Shop_update.DomainName + "/epages/" + ALIAS + ".sf", Shop_out.StorefrontURL, "updated StorefrontURL");

            // rename
            EpagesProviderWebServices.SimpleProvisioningServiceRef.TRename_Input Shop_rename = new EpagesProviderWebServices.SimpleProvisioningServiceRef.TRename_Input();
            Shop_rename.Alias    = ALIAS;
            Shop_rename.NewAlias = NEW_ALIAS;

            Console.WriteLine("simpleProvisioningService.rename");
            simpleProvisioningService.rename(Shop_rename);

            EpagesProviderWebServices.SimpleProvisioningServiceRef.TShopRef shopRefNew = new EpagesProviderWebServices.SimpleProvisioningServiceRef.TShopRef();
            shopRefNew.Alias = NEW_ALIAS;

            Console.WriteLine("simpleProvisioningService.exists");
            exists = simpleProvisioningService.exists(shopRef);
            Assert.IsFalse(exists, "old alias no longer exists");

            Console.WriteLine("simpleProvisioningService.exists");
            exists = simpleProvisioningService.exists(shopRefNew);
            Assert.IsTrue(exists, "new alias exists");

            Console.WriteLine("simpleProvisioningService.getInfo");
            Shop_out = simpleProvisioningService.getInfo(shopRefNew);

            Assert.AreEqual(NEW_ALIAS, Shop_out.Alias, "renamed ShopRefAlias");
            Assert.AreEqual("http://" + Shop_update.DomainName + "/epages/" + NEW_ALIAS + ".sf", Shop_out.StorefrontURL, "renamed StorefrontURL");

            // mark the shop for deletion
            Console.WriteLine("simpleProvisioningService.markForDeletion");
            simpleProvisioningService.markForDeletion(shopRefNew);

            Console.WriteLine("simpleProvisioningService.exists");
            exists = simpleProvisioningService.exists(shopRefNew);
            Assert.IsTrue(exists, "shop still exists");

            Console.WriteLine("simpleProvisioningService.getInfo");
            Shop_out = simpleProvisioningService.getInfo(shopRefNew);
            Assert.IsTrue(Shop_out.IsClosed, "deleted IsClosed");
            Assert.IsFalse(Shop_out.IsDeleted, "deleted IsDeleted");
            Assert.IsTrue(Shop_out.IsMarkedForDel, "deleted IsMarkedForDel");

            deleteIfExists(NEW_ALIAS);
        }