CreateDomain() public method

public CreateDomain ( string domain ) : System.Xml.Linq.XElement
domain string
return System.Xml.Linq.XElement
Ejemplo n.º 1
0
 public void TestCreateInvalidDomainNameTooLong()
 {
     var domainName = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz";
     var service = new SimpleDbRestService(new PassThroughAwsRestService ());
     var exception = Assert.Catch(() =>
         {
             service.CreateDomain(domainName);
         });
     Assert.IsInstanceOf<FormatException>(exception);
 }
Ejemplo n.º 2
0
 public void TestCreateInvalidDomainNameBadChars()
 {
     var domainName = "Domain_$_Name";
     var service = new SimpleDbRestService(new PassThroughAwsRestService ());
     var exception = Assert.Catch(() =>
         {
             service.CreateDomain(domainName);
         });
     Assert.IsInstanceOf<FormatException>(exception);
 }
Ejemplo n.º 3
0
 public void TestCreateValidDomainName()
 {
     var domainName = "A_Domain_With_Valid_Chars-1.0";
     var service = new SimpleDbRestService(new PassThroughAwsRestService ());
     var result = service.CreateDomain(domainName);
     Assert.IsTrue (result.Elements ("Argument")
         .FirstOrDefault (x =>
             x.Element ("Key").Value == "DomainName" &&
             x.Element ("Value").Value == domainName) != null);
 }