org.apache.ws.security.message
Class TimestampTest

java.lang.Object
  extended by org.junit.Assert
      extended by org.apache.ws.security.message.TimestampTest

public class TimestampTest
extends org.junit.Assert

WS-Security Test Case for Timestamps.


Constructor Summary
TimestampTest()
           
 
Method Summary
 void testCreatedSeconds()
          This is a test for processing an Timestamp where it contains a Created element with seconds > 60.
 void testCreatedValueType()
          This is a test for processing an Timestamp where it contains a Created element with a ValueType.
 void testCustomElement()
          This is a test for processing an Timestamp where it contains a CustomElement.
 void testExpiredTimestamp()
          This is a test for processing an expired Timestamp.
 void testExpiresBeforeCreated()
          This is a test for processing an Timestamp where the "Created" element is greater than the expiration time.
 void testExpiresInFrontOfCreated()
          This is a test for processing an Timestamp where it contains an "Expires" element before the Created element.
 void testFutureCreated()
          This is a test for processing an Timestamp where the "Created" element is in the future.
 void testMultipleCreated()
          This is a test for processing an Timestamp where it contains multiple "Created" elements.
 void testMultipleExpires()
          This is a test for processing an Timestamp where it contains multiple "Expires" elements.
 void testMultipleTimestamps()
          This is a test for processing multiple Timestamps in the security header
 void testNearFutureCreated()
          This is a test for processing an Timestamp where the "Created" element is in the (near) future.
 void testNoCreated()
          This is a test for processing an Timestamp where it contains no "Created" element.
 void testOldTimestamp()
          This is a test for processing an "old" Timestamp, i.e.
 void testValidTimestamp()
          This is a test for processing a valid Timestamp.
 void testValidTimestampNoExpires()
          This is a test for processing a valid Timestamp with no expires element
 
Methods inherited from class org.junit.Assert
assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertThat, assertThat, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimestampTest

public TimestampTest()
Method Detail

testValidTimestamp

public void testValidTimestamp()
                        throws java.lang.Exception
This is a test for processing a valid Timestamp.

Throws:
java.lang.Exception

testValidTimestampNoExpires

public void testValidTimestampNoExpires()
                                 throws java.lang.Exception
This is a test for processing a valid Timestamp with no expires element

Throws:
java.lang.Exception

testExpiredTimestamp

public void testExpiredTimestamp()
                          throws java.lang.Exception
This is a test for processing an expired Timestamp.

Throws:
java.lang.Exception

testOldTimestamp

public void testOldTimestamp()
                      throws java.lang.Exception
This is a test for processing an "old" Timestamp, i.e. one with a "Created" element that is out of date

Throws:
java.lang.Exception

testNearFutureCreated

public void testNearFutureCreated()
                           throws java.lang.Exception
This is a test for processing an Timestamp where the "Created" element is in the (near) future. It should be accepted by default when it is created 30 seconds in the future, and then rejected once we configure "0 seconds" for future-time-to-live.

Throws:
java.lang.Exception

testFutureCreated

public void testFutureCreated()
                       throws java.lang.Exception
This is a test for processing an Timestamp where the "Created" element is in the future. A Timestamp that is 120 seconds in the future should be rejected by default.

Throws:
java.lang.Exception

testExpiresBeforeCreated

public void testExpiresBeforeCreated()
                              throws java.lang.Exception
This is a test for processing an Timestamp where the "Created" element is greater than the expiration time.

Throws:
java.lang.Exception

testMultipleTimestamps

public void testMultipleTimestamps()
                            throws java.lang.Exception
This is a test for processing multiple Timestamps in the security header

Throws:
java.lang.Exception

testMultipleCreated

public void testMultipleCreated()
                         throws java.lang.Exception
This is a test for processing an Timestamp where it contains multiple "Created" elements. This Timestamp should be rejected.

Throws:
java.lang.Exception

testNoCreated

public void testNoCreated()
                   throws java.lang.Exception
This is a test for processing an Timestamp where it contains no "Created" element. This Timestamp should be rejected.

Throws:
java.lang.Exception

testMultipleExpires

public void testMultipleExpires()
                         throws java.lang.Exception
This is a test for processing an Timestamp where it contains multiple "Expires" elements. This Timestamp should be rejected.

Throws:
java.lang.Exception

testExpiresInFrontOfCreated

public void testExpiresInFrontOfCreated()
                                 throws java.lang.Exception
This is a test for processing an Timestamp where it contains an "Expires" element before the Created element. This Timestamp should be rejected as per the BSP spec.

Throws:
java.lang.Exception

testCreatedSeconds

public void testCreatedSeconds()
                        throws java.lang.Exception
This is a test for processing an Timestamp where it contains a Created element with seconds > 60. This should be rejected as per the BSP spec.

Throws:
java.lang.Exception

testCreatedValueType

public void testCreatedValueType()
                          throws java.lang.Exception
This is a test for processing an Timestamp where it contains a Created element with a ValueType. This should be rejected as per the BSP spec.

Throws:
java.lang.Exception

testCustomElement

public void testCustomElement()
                       throws java.lang.Exception
This is a test for processing an Timestamp where it contains a CustomElement. This should be rejected as per the BSP spec.

Throws:
java.lang.Exception


Copyright © 2004-2013 The Apache Software Foundation. All Rights Reserved.