net.sf.twip.mockito
Class MockitoExtension

java.lang.Object
  extended by net.sf.twip.TwipExtension
      extended by net.sf.twip.mockito.MockitoExtension

public class MockitoExtension
extends TwipExtension

Allows you to use the mockito @Mock annotation.


Constructor Summary
MockitoExtension()
           
 
Method Summary
 org.junit.runners.model.Statement wrapInner(org.junit.runners.model.FrameworkMethod method, Object testInstance, org.junit.runners.model.Statement statement)
          Decorate a JUnit Statement into a new one and thereby extend the functionality of JUnit.
 org.junit.runners.model.Statement wrapOuter(org.junit.runners.model.FrameworkMethod method, Object testInstance, org.junit.runners.model.Statement statement)
          Decorate a JUnit Statement into a new one and thereby extend the functionality of JUnit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockitoExtension

public MockitoExtension()
Method Detail

wrapInner

public org.junit.runners.model.Statement wrapInner(org.junit.runners.model.FrameworkMethod method,
                                                   Object testInstance,
                                                   org.junit.runners.model.Statement statement)
Description copied from class: TwipExtension
Decorate a JUnit Statement into a new one and thereby extend the functionality of JUnit. Your Statement is executed directly around the method call itself.

Overrides:
wrapInner in class TwipExtension
Parameters:
method - The test method that is to be called.
testInstance - The test instance on which the method is called.
statement - The Statement that you can wrap.
Returns:
a new Statement wrapping the one passed in; or directly that, if you choose not to wrap anything.

wrapOuter

public org.junit.runners.model.Statement wrapOuter(org.junit.runners.model.FrameworkMethod method,
                                                   Object testInstance,
                                                   org.junit.runners.model.Statement statement)
Description copied from class: TwipExtension
Decorate a JUnit Statement into a new one and thereby extend the functionality of JUnit. Your Statement is executed around all the other setups/teardowns.

Overrides:
wrapOuter in class TwipExtension
Parameters:
method - The test method that is to be called.
testInstance - The test instance on which the method is called.
statement - The Statement that you can wrap.
Returns:
a new Statement wrapping the one passed in; or directly that, if you choose not to wrap anything.


Copyright © 2011. All Rights Reserved.