public void SenderDomainCRU() { BrickStreetConnect brickst = makeClient(); HttpStatusCode status; String statusMessage; SenderDomain s1 = new SenderDomain(); s1.Name = "example.com"; s1.SigningAlg = 0; s1.DefaultDomain = false; SenderDomain s2 = brickst.AddSenderDomain(s1, out status, out statusMessage); Assert.AreEqual(HttpStatusCode.OK, status); Assert.IsNotNull(s2); Assert.IsTrue(s2.Id.HasValue); Assert.AreEqual(s2.Name, s1.Name); Assert.AreEqual(s2.SigningAlg, s1.SigningAlg); Assert.AreEqual(s2.DefaultDomain, s1.DefaultDomain); s2.Name = "example2.com"; SenderDomain s3 = brickst.UpdateSenderDomain(s2, out status, out statusMessage); Assert.AreEqual(HttpStatusCode.OK, status); Assert.IsNotNull(s3); Assert.IsTrue(s3.Id.HasValue); Assert.AreEqual(s3.Id.Value, s2.Id.Value); Assert.AreEqual(s3.Name, s2.Name); Assert.AreEqual(s3.SigningAlg, s2.SigningAlg); Assert.AreEqual(s3.DefaultDomain, s2.DefaultDomain); }