Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package test.unit.gov.nist.javax.sip.parser;
 
 
 
 
 public class RetryAfterParserTest extends ParserTestCase {
        
    @Override
    public void testParser() {
        // TODO Auto-generated method stub
        String rr[] = {
                "Retry-After: 18000;duration=3600\n",
                "Retry-After: 120;duration=3600;ra=oli\n",
                "Retry-After: 1220 (I'm in a meeting)\n",
                "Retry-After: 1230 (I'm in a meeting);fg=der;duration=23\n"
            };
            super.testParser(RetryAfterParser.classrr);
            try {
                RetryAfter retryAfter = new RetryAfter();
                retryAfter.setRetryAfter(100);
                retryAfter.setDuration(10);
                retryAfter.setComment("foo");
                ..println(new RetryAfterParser(retryAfter.encode()).parse().toString());
                assertTrueretryAfter.equals(new RetryAfterParser(retryAfter.encode()).parse()));
            } catch (Exception ex) {
                fail("Could not parse encoded header");
            }
        
    }
New to GrepCode? Check out our FAQ X