org.xwiki.test.jmock
Class AbstractMockingTestCase

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

Deprecated. starting with 4.3.1 use ComponentManagerRule instead

@Deprecated
public abstract class AbstractMockingTestCase
extends Object

Offers ability to mock Components easily.

Since:
2.4RC1
Version:
$Id: 95e728fa456428919a069c76d5dfff3e47a66165 $

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

Field Detail

mockery

public final JMockRule mockery
Deprecated. 
Automatically verify JMock expectations.

Constructor Detail

AbstractMockingTestCase

public AbstractMockingTestCase()
Deprecated. 
Method Detail

getMockery

public org.jmock.Mockery getMockery()
Deprecated. 
Returns:
the JMock Mockery objects to mock interfaces/classes and set expectations on

getComponentManager

public abstract MockingComponentManager getComponentManager()
                                                     throws Exception
Deprecated. 
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
Deprecated. 
Throws:
Exception
Since:
3.0M3

registerMockComponent

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

registerMockComponent

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

registerMockComponent

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

registerMockComponent

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

registerMockComponent

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


Copyright © 2004-2013 XWiki. All Rights Reserved.