public void TestCreateInvalidDomainNameTooLong() { var domainName = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"; var service = new SimpleDbRestService(new PassThroughAwsRestService ()); var exception = Assert.Catch(() => { service.CreateDomain(domainName); }); Assert.IsInstanceOf<FormatException>(exception); }
public void TestCreateInvalidDomainNameBadChars() { var domainName = "Domain_$_Name"; var service = new SimpleDbRestService(new PassThroughAwsRestService ()); var exception = Assert.Catch(() => { service.CreateDomain(domainName); }); Assert.IsInstanceOf<FormatException>(exception); }
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); }