public void SecDNSCreateExtension() { string expected = File.ReadAllText("SecDNSCreateExtension.xml"); var command = new DomainCreate("example1", "jd1234"); command.Period = new DomainPeriod(2, "y"); command.NameServers.Add("ns1.example.net"); command.NameServers.Add("ns2.example.net"); command.DomainContacts.Add(new DomainContact("sh8013", "admin")); command.DomainContacts.Add(new DomainContact("sh8013", "tech")); command.Password = "******"; command.TransactionId = "ABC-12345"; // create extension var extension = new SecDNSCreate { MaxSigLife = 604800 }; extension.DsData.Add(new SecDNSData { KeyTag = 12345, Algorithm = SecDNSAlgorithm.RSASHA1, Digest = "49FD46E6C4B45C55D4AC" }); command.Extensions.Add(extension); var xml = command.ToXml().InnerXml; Assert.AreEqual(expected, xml); }
public void SecDNSCreateExtension() { string expected = File.ReadAllText("SecDNSCreateExtension.xml"); var command = new DomainCreate("example1", "jd1234"); command.Period = new DomainPeriod(2, "y"); command.NameServers.Add("ns1.example.net"); command.NameServers.Add("ns2.example.net"); command.DomainContacts.Add(new DomainContact("sh8013", "admin")); command.DomainContacts.Add(new DomainContact("sh8013", "tech")); command.Password = "******"; command.TransactionId = "ABC-12345"; // create extension var extension = new SecDNSCreate { MaxSigLife = 604800 }; extension.DsData.Add(new SecDNSData { KeyTag = 12345, Algorithm = SecDNSAlgorithm.RSASHA1, Digest = "49FD46E6C4B45C55D4AC" }); command.Extensions.Add(extension); var xml = command.ToXml().InnerXml; Assert.AreEqual(expected, xml); }
public void TestDomainCreate() { var domainCreate = new DomainCreate("fff.ca", "3333333") { Period = new DomainPeriod(2, "y") }; domainCreate.DomainContacts.Add(new DomainContact("44444", "admin")); domainCreate.NameServers.Add("ns1.isqsolutions.com"); domainCreate.NameServers.Add("ns2.isqsolutions.com"); domainCreate.ToXml().Save(Console.OpenStandardOutput()); }
public void FuryCreateDomainWithPrivacy() { string expected = File.ReadAllText("FuryDomainCreateCommand.xml"); var command = new DomainCreate("mydomain.ca", "jd1234"); command.Password = "******"; command.DomainContacts.Add(new DomainContact("sh8013", "admin")); command.DomainContacts.Add(new DomainContact("sh8013", "tech")); command.Extensions.Add(new FuryDomainCreateExtension(true)); var xml = command.ToXml().InnerXml; Assert.AreEqual(expected, xml); }
public void Test() { string expected = File.ReadAllText("IdnDomainCreateCommand.xml"); var command = new DomainCreate("xn--espaol-zwa.example.com", "jd1234"); command.Password = "******"; command.DomainContacts.Add(new DomainContact("sh8013", "admin")); command.DomainContacts.Add(new DomainContact("sh8013", "tech")); command.Extensions.Add(new IdnExtension("es", "español.example.com")); var xml = command.ToXml().InnerXml; Assert.AreEqual(expected, xml); }
public void TestDomainCreate() { var domainCreate = new DomainCreate("fff.ca", "3333333") { Period = new DomainPeriod(2, "y") }; domainCreate.DomainContacts.Add(new DomainContact("44444", "admin")); domainCreate.NameServers.Add("ns1.isqsolutions.com"); domainCreate.NameServers.Add("ns2.isqsolutions.com"); domainCreate.ToXml().Save(Console.OpenStandardOutput()); }