com.atlassian.plugin.osgi
Class PluginInContainerTestBase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by com.atlassian.plugin.osgi.PluginInContainerTestBase
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
FrameworkRestartTestBase, TestApplicationContextPreProcessor, TestClassLoaderEdgeCases, TestContextClassLoader, TestDynamicPluginModule, TestEnableDisablePlugin, TestOsgiPluginInstalledHelperGetRequiredPluginsFromExports, TestPluginDependencies, TestPluginFrameworkWarmRestart, TestPluginInstall, TestPluginModuleCreation, TestPluginSpringInteraction, TestPluginWithJaxp, TestServiceUnavailable, TestShutdown

public abstract class PluginInContainerTestBase
extends junit.framework.TestCase

Base for in-container unit tests


Field Summary
protected  java.io.File cacheDir
           
protected  com.atlassian.plugin.hostcontainer.SimpleConstructorHostContainer hostContainer
           
protected  com.atlassian.plugin.ModuleDescriptorFactory moduleDescriptorFactory
           
protected  com.atlassian.plugin.module.ModuleFactory moduleFactory
           
protected  com.atlassian.plugin.osgi.container.felix.FelixOsgiContainerManager osgiContainerManager
           
protected  com.atlassian.plugin.event.PluginEventManager pluginEventManager
           
protected  com.atlassian.plugin.manager.DefaultPluginManager pluginManager
           
protected  java.io.File pluginsDir
           
protected  java.io.File tmpDir
           
 
Constructor Summary
PluginInContainerTestBase()
           
 
Method Summary
protected  com.atlassian.plugin.hostcontainer.SimpleConstructorHostContainer createHostContainer(java.util.Map<java.lang.Class<?>,java.lang.Object> originalContext)
           
protected  void initBundlingPluginManager(com.atlassian.plugin.ModuleDescriptorFactory moduleDescriptorFactory, java.io.File... bundledPluginJars)
           
protected  void initPluginManager()
           
protected  void initPluginManager(com.atlassian.plugin.osgi.hostcomponents.HostComponentProvider hostComponentProvider)
           
protected  void initPluginManager(com.atlassian.plugin.osgi.hostcomponents.HostComponentProvider hostComponentProvider, com.atlassian.plugin.ModuleDescriptorFactory moduleDescriptorFactory)
           
protected  void initPluginManager(com.atlassian.plugin.osgi.hostcomponents.HostComponentProvider hostComponentProvider, com.atlassian.plugin.ModuleDescriptorFactory moduleDescriptorFactory, java.lang.String version)
           
protected  void initPluginManager(com.atlassian.plugin.ModuleDescriptorFactory moduleDescriptorFactory, com.atlassian.plugin.loaders.PluginLoader loader)
           
 void setUp()
           
 void tearDown()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

osgiContainerManager

protected com.atlassian.plugin.osgi.container.felix.FelixOsgiContainerManager osgiContainerManager

tmpDir

protected java.io.File tmpDir

cacheDir

protected java.io.File cacheDir

pluginsDir

protected java.io.File pluginsDir

moduleDescriptorFactory

protected com.atlassian.plugin.ModuleDescriptorFactory moduleDescriptorFactory

pluginManager

protected com.atlassian.plugin.manager.DefaultPluginManager pluginManager

pluginEventManager

protected com.atlassian.plugin.event.PluginEventManager pluginEventManager

moduleFactory

protected com.atlassian.plugin.module.ModuleFactory moduleFactory

hostContainer

protected com.atlassian.plugin.hostcontainer.SimpleConstructorHostContainer hostContainer
Constructor Detail

PluginInContainerTestBase

public PluginInContainerTestBase()
Method Detail

setUp

public void setUp()
           throws java.lang.Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception

createHostContainer

protected com.atlassian.plugin.hostcontainer.SimpleConstructorHostContainer createHostContainer(java.util.Map<java.lang.Class<?>,java.lang.Object> originalContext)

tearDown

public void tearDown()
              throws java.lang.Exception
Overrides:
tearDown in class junit.framework.TestCase
Throws:
java.lang.Exception

initPluginManager

protected void initPluginManager()
                          throws java.lang.Exception
Throws:
java.lang.Exception

initPluginManager

protected void initPluginManager(com.atlassian.plugin.osgi.hostcomponents.HostComponentProvider hostComponentProvider)
                          throws java.lang.Exception
Throws:
java.lang.Exception

initPluginManager

protected void initPluginManager(com.atlassian.plugin.osgi.hostcomponents.HostComponentProvider hostComponentProvider,
                                 com.atlassian.plugin.ModuleDescriptorFactory moduleDescriptorFactory,
                                 java.lang.String version)
                          throws java.lang.Exception
Throws:
java.lang.Exception

initPluginManager

protected void initPluginManager(com.atlassian.plugin.osgi.hostcomponents.HostComponentProvider hostComponentProvider,
                                 com.atlassian.plugin.ModuleDescriptorFactory moduleDescriptorFactory)
                          throws java.lang.Exception
Throws:
java.lang.Exception

initPluginManager

protected void initPluginManager(com.atlassian.plugin.ModuleDescriptorFactory moduleDescriptorFactory,
                                 com.atlassian.plugin.loaders.PluginLoader loader)
                          throws java.lang.Exception
Throws:
java.lang.Exception

initBundlingPluginManager

protected void initBundlingPluginManager(com.atlassian.plugin.ModuleDescriptorFactory moduleDescriptorFactory,
                                         java.io.File... bundledPluginJars)
                                  throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2013 Atlassian. All Rights Reserved.