01: /*
02: * Conditions Of Use
03: *
04: * This software was developed by employees of the National Institute of
05: * Standards and Technology (NIST), and others.
06: * This software is has been contributed to the public domain.
07: * As a result, a formal license is not needed to use the software.
08: *
09: * This software is provided "AS IS."
10: * NIST MAKES NO WARRANTY OF ANY KIND, EXPRESS, IMPLIED
11: * OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTY OF
12: * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT
13: * AND DATA ACCURACY. NIST does not warrant or make any representations
14: * regarding the use of the software or the results thereof, including but
15: * not limited to the correctness, accuracy, reliability or usefulness of
16: * the software.
17: *
18: *
19: */
20: /*
21: * Created on Jul 27, 2004
22: *
23: *The JAIN-SIP project
24: */
25: package test.unit.gov.nist.javax.sip.parser;
26:
27: import gov.nist.javax.sip.parser.ContactParser;
28:
29: /**
30: * Test case for contact parser
31: *
32: * @author mranga
33: */
34: public class ContactParserTest extends ParserTestCase {
35:
36: public void testParser() {
37:
38: String contact[] = {
39: "Contact:<sip:utente@127.0.0.1:5000;transport=udp>;expires=3600\n",
40: "Contact:BigGuy<sip:utente@127.0.0.1:5000>;expires=3600\n",
41: "Contact: sip:4855@166.35.224.216:5060\n",
42: "Contact: sip:user@host.company.com\n",
43: "Contact: Bo Bob Biggs\n"
44: + "< sip:user@example.com?Route=%3Csip:sip.example.com%3E >\n",
45: "Contact: Joe Bob Briggs <sip:mranga@nist.gov>\n",
46: "Contact: \"Mr. Watson\" <sip:watson@worcester.bell-telephone.com>"
47: + " ; q=0.7; expires=3600,\"Mr. Watson\" <mailto:watson@bell-telephone.com>"
48: + ";q=0.1\n",
49: "Contact: LittleGuy <sip:UserB@there.com;user=phone>"
50: + ",<sip:+1-972-555-2222@gw1.wcom.com;user=phone>,tel:+1-972-555-2222"
51: + "\n",
52: "Contact:*\n",
53: "Contact:BigGuy<sip:utente@127.0.0.1;5000>;Expires=3600\n",
54: "Contact: sip:nobody@192.168.0.241;expires=600;q=0.5\n",
55: // pmusgrave - add +sip-instance tests (outbound & gruu drafts)
56: "Contact: <sip:callee@192.0.2.1>;+sip-instance=\"<urn:uid:f81d-5463>\"\n" };
57: super .testParser(ContactParser.class, contact);
58:
59: }
60:
61: }
|