Package org.cipango.dns.section

Examples of org.cipango.dns.section.QuestionSection


    assertEquals(0xECD1, header.getId());
    assertEquals(OpCode.QUERY, header.getOpCode());
    assertFalse(header.isTruncated());
    assertTrue(header.isRecursionDesired())
   
    QuestionSection question = message.getQuestionSection();
    assertEquals(1, question.size());
    Record record = question.get(0);
    assertEquals(Type.A, record.getType());
    assertEquals("www.cipango.org", record.getName().toString());
    assertEquals(DnsClass.IN, record.getDnsClass());
  }
View Full Code Here


    assertFalse(header.isTruncated());
    assertTrue(header.isRecursionDesired())
    assertTrue(header.isRecursionAvailable());
    assertEquals(ResponseCode.NO_ERROR, header.getResponseCode());
   
    QuestionSection question = message.getQuestionSection();
    assertEquals(1, question.size());
    Record record = question.get(0);
    assertEquals(Type.A, record.getType());
    assertEquals("www.cipango.org", record.getName().toString());
    assertEquals(DnsClass.IN, record.getDnsClass());
   
    assertEquals(1, message.getAnswerSection().size());
View Full Code Here

  public void testParsingAAAAResponse() throws Exception
  {   
    DnsMessage message = getMessage("/responseAAAA.dat");
    assertEquals(ResponseCode.NO_ERROR, message.getHeaderSection().getResponseCode());
   
    QuestionSection question = message.getQuestionSection();
    assertEquals(1, question.size());
    Record record = question.get(0);
    assertEquals(Type.AAAA, record.getType());
    assertEquals("cipango.org", record.getName().toString());
    assertEquals(DnsClass.IN, record.getDnsClass());
   
    assertEquals(1, message.getAnswerSection().size());
View Full Code Here

  public void testParsingSrvResponse() throws Exception
  {   
    DnsMessage message = getMessage("/responseSrv.dat");
    assertEquals(ResponseCode.NO_ERROR, message.getHeaderSection().getResponseCode());
   
    QuestionSection question = message.getQuestionSection();
    assertEquals(1, question.size());
    Record record = question.get(0);
    assertEquals(Type.SRV, record.getType());
    assertEquals("_sip._udp.cipango.org", record.getName().toString());
   
    assertEquals(1, message.getAnswerSection().size());
    record = message.getAnswerSection().get(0);
View Full Code Here

TOP

Related Classes of org.cipango.dns.section.QuestionSection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.