Example #1
0
        public void Serialize_WebSpacePacket_Type_Test()
        {
            var prop = new List <HostingProperty>();

            prop.Add(new HostingProperty()
            {
                Name = "ftp_login", Value = "login"
            });
            prop.Add(new HostingProperty()
            {
                Name = "ftp_password", Value = "password"
            });

            var add = new WebspaceAddPacket();

            add.webspace.add.genSetup.name      = "domain.com";
            add.webspace.add.genSetup.ipaddress = "10.6.6.5";
            add.webspace.add.hosting.Properties = prop.ToArray();

            var xml_string = client.SerializeObjectToXmlString <WebspaceAddPacket>(add);

            Assert.IsNotNull(xml_string);
        }
Example #2
0
        public void Customer_Add_Test()
        {
            var add = new CustomerAddPacket();

            add.customer.add.info.status       = "0";
            add.customer.add.info.LoginName    = "usernamer";
            add.customer.add.info.Password     = "******";
            add.customer.add.info.Email        = "email";
            add.customer.add.info.PersonalName = "fullName";
            add.customer.add.info.CompanyName  = "company";
            add.customer.add.info.Address      = "address";
            add.customer.add.info.Phone        = "phone";
            add.customer.add.info.PostalCoe    = "postalCode";
            add.customer.add.info.State        = "state";
            add.customer.add.info.Country      = "country";
            //add.customer.add.packageId = 1;
            add.customer.add.info.Fax  = "fax";
            add.customer.add.info.City = "city";

            var result = client.SerializeObjectToXmlString <CustomerAddPacket>(add);

            Assert.IsNotNull(result);
        }