com.atlassian.bamboo.mock.plugins
Class MockPrefixModuleFactory
java.lang.Object
com.atlassian.bamboo.mock.plugins.MockPrefixModuleFactory
- All Implemented Interfaces:
- com.atlassian.plugin.module.ModuleFactory, com.atlassian.plugin.module.PrefixModuleFactory
public class MockPrefixModuleFactory
- extends java.lang.Object
- implements com.atlassian.plugin.module.PrefixModuleFactory
Use it to instantiate fake module descriptors in unit tests if you don't want them to throw exceptions left right
and centre.
You may add instances of modules for given module complete key (plugin + module). Otherwise module classes are
expected to have no-arg constructor and require no dependencies.
Fields inherited from interface com.atlassian.plugin.module.ModuleFactory |
LEGACY_MODULE_FACTORY |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MockPrefixModuleFactory
public MockPrefixModuleFactory()
newDelegatingFactory
public static com.atlassian.plugin.module.PrefixDelegatingModuleFactory newDelegatingFactory()
getPrefix
public java.lang.String getPrefix()
- Specified by:
getPrefix
in interface com.atlassian.plugin.module.PrefixModuleFactory
createModule
public <T> T createModule(java.lang.String name,
com.atlassian.plugin.ModuleDescriptor<T> moduleDescriptor)
throws com.atlassian.plugin.PluginParseException
- Specified by:
createModule
in interface com.atlassian.plugin.module.ModuleFactory
- Throws:
com.atlassian.plugin.PluginParseException
addModuleInstance
public MockPrefixModuleFactory addModuleInstance(java.lang.String completeKey,
java.lang.Object instance)
Copyright © 2012 Atlassian. All Rights Reserved.