|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.momeunit.ant.event.TestEvent
public class TestEvent
Class that encapsulates information of test event. Test events of different
types can be constructed using static factory methods
createStartTestEvent(long, String, String)
,
createErrorTestEvent(long, String, String, String, String, String)
,
createFailTestEvent(long, String, String, String, String, String)
,
createEndTestEvent(long, String, String)
. This class contains
methods for accessing and modifying of type of the event; time at which this
event occurred; name and classname of test on which this event occurred;
classname, message and stack trace of error or failure occurred.
Field Summary | |
---|---|
static int |
END_TEST
End test event type. |
static int |
ERROR_TEST
Error test event type. |
static int |
FAIL_TEST
Fail test event type. |
static int |
START_TEST
Start test event type. |
Constructor Summary | |
---|---|
TestEvent()
Instantiates TestEvent. |
|
TestEvent(int type,
long timestamp,
String testName,
String testClassName,
String errorClassName,
String msg,
String stackTrace)
Instantiates TestEvent with given type, test name, test class name, class name of error or failure, error or failure message, stack trace of error or failure. |
Method Summary | |
---|---|
static TestEvent |
createEndTestEvent(long timestamp,
String testName,
String testClassName)
Creates end test event with given test name and test classname. |
static TestEvent |
createErrorTestEvent(long timestamp,
String testName,
String testClassName,
String errorClassName,
String msg,
String stackTrace)
Creates error test event with given test name, test classname, classname, message and stack trace of error occurred. |
static TestEvent |
createFailTestEvent(long timestamp,
String testName,
String testClassName,
String errorClassName,
String msg,
String stackTrace)
Creates failure test event with given test name, test classname, classname, message and stack trace of error occurred. |
static TestEvent |
createStartTestEvent(long timestamp,
String testName,
String testClassName)
Creates start test event with given test name and test classname. |
String |
getErrorClassName()
Returns classname of error or failure occurred. |
String |
getMsg()
Returns message of error or failure occurred. |
String |
getStackTrace()
Returns stack trace of error or failure occurred. |
String |
getTestClassName()
Returns classname of test during which execution a test event occurred. |
String |
getTestName()
Returns name of test during which execution a test event occurred. |
long |
getTimestamp()
Returns time at which test event occurred. |
int |
getType()
Returns type of test event. |
boolean |
isFailure()
Returns whether this test event is a failure test event. |
void |
setErrorClassName(String errorClassName)
Sets classname of error or failure occurred. |
void |
setMsg(String msg)
Sets message of error or failure occurred. |
void |
setStackTrace(String stackTrace)
Sets stack trace of error or failure occurred. |
void |
setTestClassName(String testClassName)
Sets classname of test during which execution a test event occurred. |
void |
setTestName(String testName)
Sets name of test during which execution a test event occurred. |
void |
setTimestamp(long timestamp)
Sets time at which test event occurred. |
void |
setType(int type)
Sets type of test event. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int START_TEST
public static final int FAIL_TEST
public static final int ERROR_TEST
public static final int END_TEST
Constructor Detail |
---|
public TestEvent()
public TestEvent(int type, long timestamp, String testName, String testClassName, String errorClassName, String msg, String stackTrace)
type
- type of TestEvent.timestamp
- time at which this event occurred.testName
- name of test on which this event occurs.testClassName
- classname of test on which this event occurs.errorClassName
- classname of error or failure.msg
- error or failure message.stackTrace
- stack trace of error or failure.Method Detail |
---|
public static TestEvent createStartTestEvent(long timestamp, String testName, String testClassName)
timestamp
- time at which this event occurred.testName
- name of test started.testClassName
- classname of test started.
public static TestEvent createEndTestEvent(long timestamp, String testName, String testClassName)
timestamp
- time at which this event occurred.testName
- name of test finished.testClassName
- classname of test finished.
public static TestEvent createErrorTestEvent(long timestamp, String testName, String testClassName, String errorClassName, String msg, String stackTrace)
timestamp
- time at which this event occurred.testName
- name of test during execution error occurred.testClassName
- classname of test during execution error occurred.errorClassName
- classname of error occurred.msg
- message of error occurred.stackTrace
- stack trace of error occurred.
public static TestEvent createFailTestEvent(long timestamp, String testName, String testClassName, String errorClassName, String msg, String stackTrace)
timestamp
- time at which this event occurred.testName
- name of test during execution failure occurred.testClassName
- classname of test during execution failure occurred.errorClassName
- classname of failure occurred.msg
- message of failure occurred.stackTrace
- stack trace of failure occurred.
public String getErrorClassName()
public void setErrorClassName(String errorClassName)
errorClassName
- classname of error or failure occurred.public String getMsg()
public void setMsg(String msg)
msg
- the message of error or failure occurred.public String getStackTrace()
public void setStackTrace(String stackTrace)
stackTrace
- stack trace of error or failure occurred.public String getTestClassName()
public void setTestClassName(String testClassName)
testClassName
- the classname of test during which execution a test event
occurred.public String getTestName()
public void setTestName(String testName)
testName
- name of test during which execution a test event occurred.public long getTimestamp()
public void setTimestamp(long timestamp)
timestamp
- the time at which test event occurred.public boolean isFailure()
true
if this test event is a failure test event,
false
otherwise.public int getType()
public void setType(int type)
type
- type of test event.public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |