All Downloads are FREE. Search and download functionalities are using the official Maven repository.

test.unit.gov.nist.javax.sip.parser.ContactParserTest Maven / Gradle / Ivy

There is a newer version: 1.3.0-91
Show newest version
/*
* Conditions Of Use
*
* This software was developed by employees of the National Institute of
* Standards and Technology (NIST), and others.
* This software is has been contributed to the public domain.
* As a result, a formal license is not needed to use the software.
*
* This software is provided "AS IS."
* NIST MAKES NO WARRANTY OF ANY KIND, EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTY OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT
* AND DATA ACCURACY.  NIST does not warrant or make any representations
* regarding the use of the software or the results thereof, including but
* not limited to the correctness, accuracy, reliability or usefulness of
* the software.
*
*
*/
/*
 * Created on Jul 27, 2004
 *
 *The JAIN-SIP project
 */
package test.unit.gov.nist.javax.sip.parser;

import gov.nist.javax.sip.parser.ContactParser;

/**
 * Test case for contact parser
 *
 * @author mranga
 */
public class ContactParserTest extends ParserTestCase {

    public void testParser() {

        String contact[] = {
                "Contact:;expires=3600\n",
                "Contact:BigGuy;expires=3600\n",
                "Contact: sip:[email protected]:5060\n",
                "Contact: sip:[email protected]\n",
                "Contact: Bo Bob Biggs\n"
                        + "< sip:[email protected]?Route=%3Csip:sip.example.com%3E >\n",
                "Contact: Joe Bob Briggs \n",
                "Contact: \"Mr. Watson\" "
                        + " ; q=0.7; expires=3600,\"Mr. Watson\" "
                        + ";q=0.1\n",
                "Contact: LittleGuy "
                        + ",,tel:+1-972-555-2222"
                        + "\n",
                "Contact:*\n",
                "Contact:BigGuy;Expires=3600\n" ,
                "Contact: sip:[email protected];expires=600;q=0.5\n",
                "Contact: \n",
                // pmusgrave - add +sip-instance tests (outbound & gruu drafts)
                "Contact: ;+sip-instance=\"\"\n" };
        super.testParser(ContactParser.class, contact);

    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy