Exemplo n.º 1
0
        public void Roundtrip_Master()
        {
            var a = new RPRecord
            {
                Name    = "emanon.org",
                Mailbox = "nowon.emanon.org"
            };
            var b = (RPRecord) new ResourceRecord().Read(a.ToString());

            Assert.AreEqual(a.Name, b.Name);
            Assert.AreEqual(a.Class, b.Class);
            Assert.AreEqual(a.Type, b.Type);
            Assert.AreEqual(a.TTL, b.TTL);
            Assert.AreEqual(a.Mailbox, b.Mailbox);
            Assert.AreEqual(a.TextName, b.TextName);
        }
Exemplo n.º 2
0
        public void Equality()
        {
            var a = new RPRecord
            {
                Name    = "emanon.org",
                Mailbox = "nowon.emanon.org"
            };
            var b = new RPRecord
            {
                Name    = "emanon.org",
                Mailbox = "someone.emanon.org"
            };

            Assert.IsTrue(a.Equals(a));
            Assert.IsFalse(a.Equals(b));
            Assert.IsFalse(a.Equals(null));
        }