org.testng
Class TimeBombSkipException

java.lang.Object  extended by java.lang.Throwable      extended by java.lang.Exception          extended by java.lang.RuntimeException              extended by org.testng.SkipException                  extended by org.testng.TimeBombSkipException
All Implemented Interfaces:
Serializable

public class TimeBombSkipException
extends SkipException

A SkipException extension that transforms a skipped method into a failed method based on a time trigger.

By default the time format is yyyy/MM/dd (according to SimpleDateFormat). You can customize this by using the specialized constructors. Suppported date formats are according to the SimpleDateFormat.

Since:
5.6
Author:
Alex Popescu
See Also:
Serialized Form


Constructor Summary
TimeBombSkipException(String msg, Date expirationDate)
          Creates a TimeBombedSkipException using the expirationDate.
TimeBombSkipException(String msg, Date expirationDate, String format)
          Creates a TimeBombedSkipException using the expirationDate.
TimeBombSkipException(String msg, Date expirationDate, String format, Throwable cause)
          Creates a TimeBombedSkipException using the expirationDate.
TimeBombSkipException(String msg, Date expirationDate, Throwable cause)
          Creates a TimeBombedSkipException using the expirationDate.
TimeBombSkipException(String msg, String date)
          Creates a TimeBombedSkipException using the date in the format yyyy/MM/dd.
TimeBombSkipException(String msg, String date, String format)
          Creates a TimeBombedSkipException using the date in the specified format format.
TimeBombSkipException(String msg, String date, String inFormat, String outFormat)
          Creates a TimeBombedSkipException using the date in the specified format inFormat.
TimeBombSkipException(String msg, String date, String inFormat, String outFormat, Throwable cause)
          Creates a TimeBombedSkipException using the date in the specified format inFormat.
TimeBombSkipException(String msg, String date, String format, Throwable cause)
          Creates a TimeBombedSkipException using the date in the specified format format.
TimeBombSkipException(String msg, String date, Throwable cause)
          Creates a TimeBombedSkipException using the date in the format yyyy/MM/dd.
 
Method Summary
 StringgetMessage()
           
 booleanisSkip()
          Flag if the current exception marks a skipped method (true) or a failure (false).
 voidprintStackTrace(PrintStream s)
           
 voidprintStackTrace(PrintWriter s)
           
 
Methods inherited from class org.testng.SkipException
reduceStackTrace, restoreStackTrace
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TimeBombSkipException

public TimeBombSkipException(String msg,                             Date expirationDate)
Creates a TimeBombedSkipException using the expirationDate. The format used for date comparison is yyyy/MM/dd

Parameters:
msg - exception message
expirationDate - time limit after which the SKIP becomes a FAILURE


TimeBombSkipException

public TimeBombSkipException(String msg,                             Date expirationDate,                             String format)
Creates a TimeBombedSkipException using the expirationDate. The format parameter wiil be used for performing the time comparison.

Parameters:
msg - exception message
expirationDate - time limit after which the SKIP becomes a FAILURE
format - format for the time comparison


TimeBombSkipException

public TimeBombSkipException(String msg,                             String date)
Creates a TimeBombedSkipException using the date in the format yyyy/MM/dd.

Parameters:
msg - exception message
date - time limit after which the SKIP becomes a FAILURE


TimeBombSkipException

public TimeBombSkipException(String msg,                             String date,                             String format)
Creates a TimeBombedSkipException using the date in the specified format format. The same format is used when performing the time comparison.

Parameters:
msg - exception message
date - time limit after which the SKIP becomes a FAILURE
format - format of the passed in date and of the time comparison


TimeBombSkipException

public TimeBombSkipException(String msg,                             String date,                             String inFormat,                             String outFormat)
Creates a TimeBombedSkipException using the date in the specified format inFormat. The outFormat will be used to perform the time comparison and display.

Parameters:
msg - exception message
date - time limit after which the SKIP becomes a FAILURE
inFormat - format of the passed in date
outFormat - format of the time comparison


TimeBombSkipException

public TimeBombSkipException(String msg,                             Date expirationDate,                             Throwable cause)
Creates a TimeBombedSkipException using the expirationDate. The format used for date comparison is yyyy/MM/dd

Parameters:
msg - exception message
expirationDate - time limit after which the SKIP becomes a FAILURE
cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)


TimeBombSkipException

public TimeBombSkipException(String msg,                             Date expirationDate,                             String format,                             Throwable cause)
Creates a TimeBombedSkipException using the expirationDate. The format parameter wiil be used for performing the time comparison.

Parameters:
msg - exception message
expirationDate - time limit after which the SKIP becomes a FAILURE
format - format for the time comparison
cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)


TimeBombSkipException

public TimeBombSkipException(String msg,                             String date,                             Throwable cause)
Creates a TimeBombedSkipException using the date in the format yyyy/MM/dd.

Parameters:
msg - exception message
date - time limit after which the SKIP becomes a FAILURE
cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)


TimeBombSkipException

public TimeBombSkipException(String msg,                             String date,                             String format,                             Throwable cause)
Creates a TimeBombedSkipException using the date in the specified format format. The same format is used when performing the time comparison.

Parameters:
msg - exception message
date - time limit after which the SKIP becomes a FAILURE
format - format of the passed in date and of the time comparison
cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)


TimeBombSkipException

public TimeBombSkipException(String msg,                             String date,                             String inFormat,                             String outFormat,                             Throwable cause)
Creates a TimeBombedSkipException using the date in the specified format inFormat. The outFormat will be used to perform the time comparison and display.

Parameters:
msg - exception message
date - time limit after which the SKIP becomes a FAILURE
inFormat - format of the passed in date
outFormat - format of the time comparison
cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)

Method Detail

isSkip

public boolean isSkip()
Description copied from class: SkipException
Flag if the current exception marks a skipped method (true) or a failure (false). By default Subclasses should override this method in order to provide smarter behavior.

Overrides:
isSkip in class SkipException
Returns:
true if the method should be considered a skip, false if the method should be considered failed. If not overwritten it returns true

getMessage

public String getMessage()
Overrides:
getMessage in class Throwable

printStackTrace

public void printStackTrace(PrintStream s)
Overrides:
printStackTrace in class Throwable

printStackTrace

public void printStackTrace(PrintWriter s)
Overrides:
printStackTrace in class Throwable


Copyright © 2012. All Rights Reserved.


NOTHING
NOTHING
Add the Maven Dependecy to your project: maven dependecy for com.amazonaws : aws-java-sdk : 1.3.14