| java.lang.Object com.sun.midp.i3test.TestCase javax.microedition.sip.SipHeaderBaseTest javax.microedition.sip.TestContactHeader
TestContactHeader | public class TestContactHeader extends SipHeaderBaseTest (Code) | | RFC3261, p. 167
A Contact header field value provides a URI whose meaning depends on
the type of request or response it is in.
A Contact header field value can contain a display name, a URI with
URI parameters, and header parameters.
This document defines the Contact parameters "q" and "expires".
These parameters are only used when the Contact is present in a
REGISTER request or response, or in a 3xx response. Additional
parameters may be defined in other specifications.
When the header field value contains a display name, the URI
including all URI parameters is enclosed in "<" and ">". If no "<"
and ">" are present, all parameters after the URI are header
parameters, not URI parameters. The display name can be tokens, or a
quoted string, if a larger character set is desired.
Even if the "display-name" is empty, the "name-addr" form MUST be
used if the "addr-spec" contains a comma, semicolon, or question
mark. There may or may not be LWS between the display-name and the
"<".
These rules for parsing a display name, URI and URI parameters, and
header parameters also apply for the header fields To and From.
The Contact header field has a role similar to the Location header
field in HTTP. However, the HTTP header field only allows one
address, unquoted. Since URIs can contain commas and semicolons
as reserved characters, they can be mistaken for header or
parameter delimiters, respectively.
The compact form of the Contact header field is m (for "moved").
Examples:
Contact: "Mr. Watson"
;q=0.7; expires=3600,
"Mr. Watson" ;q=0.1
m: ;expires=60
|
Method Summary | |
void | Test1() Body of the test 1. | void | Test2() Body of the test 2. | void | Test3() Body of the test 3. | void | Test4() Body of the test 4. | void | Test5() Body of the test 5. | void | Test6() Body of the test 6. | public void | runTests() |
Test1 | void Test1()(Code) | | Body of the test 1.
Test for Contact header field: setName()/getName().
|
Test2 | void Test2()(Code) | | Body of the test 2.
Test for Contact header field: getValue()/getHeaderValue().
|
Test3 | void Test3()(Code) | | Body of the test 3.
Test for Contact header field: setValue().
|
Test4 | void Test4()(Code) | | Body of the test 4.
Test for Contact header field: getParameterNames()/getParameter().
|
Test5 | void Test5()(Code) | | Body of the test 5.
Test for Contact header field: setParameter()/removeParameter().
|
Test6 | void Test6()(Code) | | Body of the test 6.
Test for Contact header field: toString().
|
runTests | public void runTests()(Code) | | Run the tests
|
Methods inherited from com.sun.midp.i3test.TestCase | public void assertEquals(Object expected, Object actual)(Code)(Java Doc) public void assertEquals(String message, Object expected, Object actual)(Code)(Java Doc) public void assertEquals(int expected, int actual)(Code)(Java Doc) public void assertEquals(String message, int expected, int actual)(Code)(Java Doc) public void assertFalse(boolean condition)(Code)(Java Doc) public void assertFalse(String message, boolean condition)(Code)(Java Doc) public void assertNotNull(Object object)(Code)(Java Doc) public void assertNotNull(String message, Object object)(Code)(Java Doc) public void assertNotSame(Object expected, Object actual)(Code)(Java Doc) public void assertNotSame(String message, Object expected, Object actual)(Code)(Java Doc) public void assertNull(Object object)(Code)(Java Doc) public void assertNull(String message, Object object)(Code)(Java Doc) public void assertSame(Object expected, Object actual)(Code)(Java Doc) public void assertSame(String message, Object expected, Object actual)(Code)(Java Doc) public void assertTrue(String message, boolean condition)(Code)(Java Doc) public void assertTrue(boolean condition)(Code)(Java Doc) public void declare(String testName)(Code)(Java Doc) public void fail()(Code)(Java Doc) public void fail(String message)(Code)(Java Doc) protected SecurityToken getSecurityToken()(Code)(Java Doc) protected boolean getVerbose()(Code)(Java Doc) public void info(String s)(Code)(Java Doc) abstract public void runTests() throws Throwable(Code)(Java Doc)
|
|
|