org.apache.wicket.spring.injection.annot.test
Class AnnotApplicationContextMock

java.lang.Object
  extended by org.apache.wicket.spring.test.ApplicationContextMock
      extended by org.apache.wicket.spring.injection.annot.test.AnnotApplicationContextMock
All Implemented Interfaces:
Serializable, org.springframework.beans.factory.BeanFactory, org.springframework.beans.factory.HierarchicalBeanFactory, org.springframework.beans.factory.ListableBeanFactory, org.springframework.context.ApplicationContext, org.springframework.context.ApplicationEventPublisher, org.springframework.context.MessageSource, org.springframework.core.io.ResourceLoader, org.springframework.core.io.support.ResourcePatternResolver

public class AnnotApplicationContextMock
extends ApplicationContextMock

Spring application context mock that does all the initialization required to setup an AnnotSpringInjector that will use this mock context as its source of beans.

Example

 AnnotApplicationContextMock appctx = new AnnotApplicationContextMock();
  appctx.putBean("contactDao", dao);
  
  WicketTester app = new WicketTester();
  
  Page deletePage=new DeleteContactPage(new DummyHomePage(), 10));
 
DeleteContactPage will have its dependencies initialized by the AnnotSpringInjector

Author:
Igor Vaynberg (ivaynberg)
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.springframework.beans.factory.BeanFactory
FACTORY_BEAN_PREFIX
 
Fields inherited from interface org.springframework.core.io.support.ResourcePatternResolver
CLASSPATH_ALL_URL_PREFIX
 
Fields inherited from interface org.springframework.core.io.ResourceLoader
CLASSPATH_URL_PREFIX
 
Constructor Summary
AnnotApplicationContextMock()
          Constructor
 
Method Summary
 
Methods inherited from class org.apache.wicket.spring.test.ApplicationContextMock
containsBean, containsBeanDefinition, containsLocalBean, getAliases, getAutowireCapableBeanFactory, getBean, getBean, getBean, getBeanDefinitionCount, getBeanDefinitionNames, getBeanNamesForType, getBeanNamesForType, getBeansOfType, getBeansOfType, getClassLoader, getDisplayName, getId, getMessage, getMessage, getMessage, getParent, getParentBeanFactory, getResource, getResources, getStartupDate, getType, isPrototype, isSingleton, isTypeMatch, publishEvent, putBean, putBean
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotApplicationContextMock

public AnnotApplicationContextMock()
Constructor

Sets up an AnnotSpringInjector that will use this mock context as its source of beans



Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.