com.beust.testng
Interface ITestNGMethod


public interface ITestNGMethod

Describes a test method and the instance on which it will be invoked

Author:
Cedric Beust, May 3, 2004

Method Summary
 java.util.Date getDate()
           
 java.lang.String[] getGroups()
           
 java.lang.String[] getGroupsDependedUpon()
           
 long getId()
           
 java.lang.Object[] getInstances()
           
 int getInvocationCount()
           
 java.lang.reflect.Method getMethod()
           
 java.lang.String[] getMethodsDependedUpon()
           
 java.lang.Class getRealClass()
           
 int getSuccessPercentage()
           
 ITestClass getTestClass()
           
 long getTimeOut()
           
 boolean isAfterClassConfiguration()
           
 boolean isAfterMethodConfiguration()
           
 boolean isBeforeClassConfiguration()
           
 boolean isBeforeMethodConfiguration()
           
 boolean isTest()
           
 void setDate(java.util.Date date)
           
 void setId(long id)
           
 void setTestClass(ITestClass cls)
           
 

Method Detail

getRealClass

java.lang.Class getRealClass()
Returns:
The real class on which this method was declared (can be different from getMethod().getDeclaringClass() if the test method was defined in a superclass).

getTestClass

ITestClass getTestClass()

setTestClass

void setTestClass(ITestClass cls)

getMethod

java.lang.reflect.Method getMethod()
Returns:
The test method.

getInstances

java.lang.Object[] getInstances()
Returns:
All the instances the methods will be invoked upon. This will typically be an array of one object in the absence of an @Factory annotation.

getGroups

java.lang.String[] getGroups()
Returns:
The groups this method belongs to, possibly added to the groups declared on the class.

getGroupsDependedUpon

java.lang.String[] getGroupsDependedUpon()
Returns:
The groups this method depends on, possibly added to the groups declared on the class.

getMethodsDependedUpon

java.lang.String[] getMethodsDependedUpon()
Returns:
The methods this method depends on, possibly added to the methods declared on the class.

isTest

boolean isTest()
Returns:
true if this method was annotated with @Test

isBeforeMethodConfiguration

boolean isBeforeMethodConfiguration()
Returns:
true if this methow was annotated with @Configuration and beforeTestMethod = true

isAfterMethodConfiguration

boolean isAfterMethodConfiguration()
Returns:
true if this methow was annotated with @Configuration and beforeTestMethod = false

isBeforeClassConfiguration

boolean isBeforeClassConfiguration()
Returns:
true if this methow was annotated with @Configuration and beforeClassMethod = true

isAfterClassConfiguration

boolean isAfterClassConfiguration()
Returns:
true if this methow was annotated with @Configuration and beforeClassMethod = false

getTimeOut

long getTimeOut()
Returns:
The timeout in milliseconds.

getInvocationCount

int getInvocationCount()
Returns:
the number of times this method needs to be invoked.

getSuccessPercentage

int getSuccessPercentage()
Returns:
the success percentage for this method (between 0 and 100).

getId

long getId()
Returns:
The id of the thread this method was run in.

setId

void setId(long id)

getDate

java.util.Date getDate()

setDate

void setDate(java.util.Date date)