org.xwiki.test
Class AbstractMockingTestCase

java.lang.Object
  extended by org.xwiki.test.AbstractMockingTestCase
Direct Known Subclasses:
AbstractComponentTestCase, AbstractMockingComponentTestCase

public abstract class AbstractMockingTestCase
extends Object

Offers a JMock 2.x Mockery object.

Since:
2.4RC1
Version:
$Id$

Constructor Summary
AbstractMockingTestCase()
           
 
Method Summary
abstract  EmbeddableComponentManager getComponentManager()
           
 org.jmock.Mockery getMockery()
           
<T> T
registerMockComponent(Class<T> role)
           
<T> T
registerMockComponent(Class<T> role, String hint)
           
<T> T
registerMockComponent(Class<T> role, String hint, String mockId)
           
<T> T
registerMockComponent(Type role)
           
<T> T
registerMockComponent(Type role, String hint)
           
<T> T
registerMockComponent(Type role, String hint, String mockId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractMockingTestCase

public AbstractMockingTestCase()
Method Detail

getMockery

public org.jmock.Mockery getMockery()

getComponentManager

public abstract EmbeddableComponentManager getComponentManager()
                                                        throws Exception
Returns:
a configured Component Manager (which uses the plexus.xml file in the test resources directory) which can then be put in the XWiki Context for testing.
Throws:
Exception

registerMockComponent

public <T> T registerMockComponent(Class<T> role,
                                   String hint,
                                   String mockId)
                        throws Exception
Throws:
Exception
Since:
3.0M3

registerMockComponent

public <T> T registerMockComponent(Type role,
                                   String hint,
                                   String mockId)
                        throws Exception
Throws:
Exception
Since:
4.0M1

registerMockComponent

public <T> T registerMockComponent(Class<T> role,
                                   String hint)
                        throws Exception
Throws:
Exception
Since:
2.4RC1

registerMockComponent

public <T> T registerMockComponent(Type role,
                                   String hint)
                        throws Exception
Throws:
Exception
Since:
4.0M1

registerMockComponent

public <T> T registerMockComponent(Class<T> role)
                        throws Exception
Throws:
Exception
Since:
2.4RC1

registerMockComponent

public <T> T registerMockComponent(Type role)
                        throws Exception
Throws:
Exception
Since:
4.0M1


Copyright © 2004-2012 XWiki. All Rights Reserved.