Beispiel #1
0
        public void NoStrings()
        {
            var a = new TXTRecord
            {
                Name = "the.printer.local",
            };
            var b = (TXTRecord) new ResourceRecord().Read(a.ToByteArray());

            Assert.AreEqual(a.Name, b.Name);
            Assert.AreEqual(a.Class, b.Class);
            Assert.AreEqual(a.Type, b.Type);
            Assert.AreEqual(a.TTL, b.TTL);
            CollectionAssert.AreEqual(a.Strings, b.Strings);
        }
Beispiel #2
0
        public void Roundtrip()
        {
            var a = new TXTRecord
            {
                Name    = "the.printer.local",
                Strings = new List <string>
                {
                    "paper=A4",
                    "colour=false"
                }
            };
            var b = (TXTRecord) new ResourceRecord().Read(a.ToByteArray());

            Assert.AreEqual(a.Name, b.Name);
            Assert.AreEqual(a.Class, b.Class);
            Assert.AreEqual(a.Type, b.Type);
            Assert.AreEqual(a.TTL, b.TTL);
            CollectionAssert.AreEqual(a.Strings, b.Strings);
        }