com.mycila.testing.core.api
Interface Execution

All Known Subinterfaces:
TestExecution

public interface Execution

Represents a current execution of a method in a test

Author:
Mathieu Carbou (mathieu.carbou@gmail.com)

Method Summary
 Attributes attributes()
          Handle attributes of this Execution Context, which can be shared amongst plugins
 TestContext context()
           
 boolean hasFailed()
           
 Method method()
          Get the test method that is going to be executed or has been executed
 void setThrowable(Throwable throwable)
          Mark a test execution metod of having failed by providing its exception thrown
 Step step()
           
 Throwable throwable()
           
 

Method Detail

step

Step step()
Returns:
The current step of this execution

method

Method method()
Get the test method that is going to be executed or has been executed

Returns:
The test method

context

TestContext context()
Returns:
The Context of the test instance

throwable

Throwable throwable()
Returns:
The exception thrown by the method execution if it failed. Returns null if none

hasFailed

boolean hasFailed()
Returns:
wheter the method has thrown an exception

setThrowable

void setThrowable(Throwable throwable)
Mark a test execution metod of having failed by providing its exception thrown

Parameters:
throwable - The exception thrown by teh method

attributes

Attributes attributes()
Handle attributes of this Execution Context, which can be shared amongst plugins

Returns:
Attribute handler


Copyright © 2008-2011 Mycila. All Rights Reserved.