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 25, 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.*;
28:
29: /** Unit test case for Authorization parser
30: *
31: * @author mranga
32: */
33: public class AuthorizationParserTest extends ParserTestCase {
34:
35: public void testParser() {
36:
37: String auth[] = {
38: "Authorization: Digest username=\"UserB\", realm=\"MCI WorldCom SIP\","
39: + " nonce=\"ea9c8e88df84f1cec4341ae6cbe5a359\", opaque=\"\","
40: + " uri=\"sip:ss2.wcom.com\", response=\"dfe56131d1958046689cd83306477ecc\"\n",
41:
42: "Authorization: Digest username=\"aprokop\",realm=\"Realm\",nonce=\"MTA1MDMzMjE5ODUzMjUwM2QyMzBhOTJlMTkxYjIxYWY1NDlhYzk4YzNiMGYz\",uri=\"sip:nortelnetworks.com:5060\",response=\"dbfba6c0e9664b45b7d224d2b52a1d01\",algorithm=\"MD5\",cnonce=\"VG05eWRHVnNJRTVsZEhkdmNtdHpNVEExTURNek16WTFOREUyTUE9PQ==\",qop=auth-int,nc=00000001\n"
43:
44: };
45: super .testParser(AuthorizationParser.class, auth);
46:
47: }
48:
49: }
|