public void SecDNSUpdateExtension() { string expected = File.ReadAllText("SecDNSUpdateExtension.xml"); var command = new DomainUpdate("example1"); var extension = new SecDNSUpdate(); // remove extension.ToRemove.Add(new SecDNSData { KeyTag = 12345, Algorithm = SecDNSAlgorithm.RSASHA1, Digest = "49FD46E6C4B45C55D4AC" }); // add extension.ToAdd.Add(new SecDNSData { KeyTag = 12346, Algorithm = SecDNSAlgorithm.RSASHA1, Digest = "38EC35D5B3A34B44C39B" }); command.Extensions.Add(extension); var xml = command.ToXml().InnerXml; Assert.AreEqual(expected, xml); }
public void FuryUpdateDomainWithPrivacy() { string expected = File.ReadAllText("FuryDomainUpdateCommand.xml"); var command = new DomainUpdate("example.com"); var domainChange = new DomainChange { AuthInfo = "password2" }; command.DomainChange = domainChange; command.Extensions.Add(new FuryDomainUpdateExtension(false)); var xml = command.ToXml().InnerXml; Assert.AreEqual(expected, xml); }