ToArray() public method

public ToArray ( ) : byte[]
return byte[]
Beispiel #1
0
        public void BasicQuestionWithEmptyDomain() {
            byte[] content = Helper.ReadFixture("Question", "empty-domain_basic");
            Domain domain = new Domain(Helper.GetArray<string>());
            Question question = new Question(domain, RecordType.A, RecordClass.IN);

            CollectionAssert.AreEqual(content, question.ToArray());
        }
Beispiel #2
0
        public void AllSetQuestionWithMultipleLabelDomain() {
            byte[] content = Helper.ReadFixture("Question", "www.google.com_all");
            Domain domain = new Domain(Helper.GetArray("www", "google", "com"));
            Question question = new Question(domain, RecordType.CNAME, RecordClass.ANY);

            CollectionAssert.AreEqual(content, question.ToArray());
        }