public void Stringing() { var a = new ResourceRecord { Name = "x.emanon.org", Type = DnsType.A }; Assert.AreEqual("x.emanon.org IN A \\# 0", a.ToString()); a = new ResourceRecord { Name = "x.emanon.org", Type = DnsType.A, Class = DnsClass.CH }; Assert.AreEqual("x.emanon.org CH A \\# 0", a.ToString()); a = new ResourceRecord { Name = "x.emanon.org", Type = DnsType.A, TTL = TimeSpan.FromSeconds(123) }; Assert.AreEqual("x.emanon.org 123 IN A \\# 0", a.ToString()); }
public void Stringing_UnknownType() { var a = new ResourceRecord { Name = "x.emanon.org", Type = (DnsType)1234 }; Assert.AreEqual("x.emanon.org IN TYPE1234 \\# 0", a.ToString()); }
public void Stringing_UnknownClass() { var a = new ResourceRecord { Name = "x.emanon.org", Class = (DnsClass)1234, Type = DnsType.A }; Assert.AreEqual("x.emanon.org CLASS1234 A \\# 0", a.ToString()); }