Beispiel #1
0
        public void TestContactUpdateCommandNominetPrivacyOn()
        {
            string expected = File.ReadAllText("ContactUpdateCommandNominetPrivacyOn.xml");//set a new file

            ContactChange contactChange = new ContactChange();

            contactChange.DiscloseFlag = false;
            contactChange.DiscloseMask = ~Contact.DiscloseFlags.OrganizationInt & ~Contact.DiscloseFlags.AddressInt;

            var command = new ContactUpdate("CONTACT-1234");

            command.ContactChange = contactChange;

            command.TransactionId = "ABC-12345";
            command.Password      = "******";
            Assert.AreEqual(expected, command.ToXml().InnerXml);
        }
        public void FuryContactUpdateWithPrivacy()
        {
            string expected = File.ReadAllText("FuryContactUpdateCommand.xml");

            var command = new ContactUpdate("agreed2");

            //change contact email and language
            var contactChange = new ContactChange();

            contactChange.Email = "*****@*****.**";

            command.ContactChange = contactChange;

            command.Extensions.Add(new FuryContactUpdateExtension("en", "fr"));

            var xml = command.ToXml().InnerXml;

            Assert.AreEqual(expected, xml);
        }
Beispiel #3
0
        public void TestContactUpdateCommandNominetPrivacyOn()
        {
            string expected = File.ReadAllText("ContactUpdateCommandNominetPrivacyOn.xml");//set a new file

            ContactChange contactChange = new ContactChange();
            contactChange.DiscloseFlag = false;
            contactChange.DiscloseMask = ~Contact.DiscloseFlags.OrganizationInt & ~Contact.DiscloseFlags.AddressInt;

            var command = new ContactUpdate("CONTACT-1234");
            command.ContactChange = contactChange;

            command.TransactionId = "ABC-12345";
            command.Password = "******";
            Assert.AreEqual(expected, command.ToXml().InnerXml);
        }