public class IntegrationTest
extends org.springframework.osgi.test.AbstractConfigurableBundleCreatorTests
Modifier and Type | Class and Description |
---|---|
class |
IntegrationTest.FakeBundleContext
The class is used for intercepting installation of test bundle.
|
INCLUDE_PATTERNS, LIBS, MANIFEST, ROOT_DIR
DEFAULT_WAIT_TIME
OSGI_FRAMEWORK_SELECTOR
bundleContext
AUTOWIRE_BY_NAME, AUTOWIRE_BY_TYPE, AUTOWIRE_NO
Modifier | Constructor and Description |
---|---|
protected |
IntegrationTest()
Invoking noargument constructor indicates as follows:
Default uAAL rundir, deployed to the nexus, is used
The pax composite from project's target/artifact.composite file is
launched.
|
protected |
IntegrationTest(String eclipseLaunchConfiguration)
Invoking this constructor indicates that provided eclipse launch
configuration is used for:
providing set of bundles which should be started,
providing run arguments,
providing bundles.configuration.location (uAAL runtime configuration
directory)
Run arguments and bundles.configuration.location can be overridden by
invocation of appropriate setter methods.
|
Modifier and Type | Method and Description |
---|---|
protected String |
formatMsg(String format,
Object... args)
Formatting log messages with a use of String.format.
|
protected String |
getPlatformName()
This method informs Spring DM framework that Felix should be used as the
OSGi platform for the tests.
|
protected org.springframework.core.io.Resource[] |
getTestBundles()
This method returns sorted list of bundles which will be started for the
purpose of the TestCase.
|
protected void |
log(String logMsg)
Method for logging.
|
protected void |
logAllBundles()
Logs all bundles.
|
protected void |
postProcessBundleContext(org.osgi.framework.BundleContext context)
Method postProcessBundleContext has to be overridden to wrap system
bundleContext into a fake one.
|
protected void |
setBundleConfLocation(String path)
Sets bundles.configuration.location system property.
|
protected void |
setIgnoreLastBudnle(boolean ignoreLast)
Sets a flag that ignores the last bundle in artefact.composite for run
this test.
|
void |
setIgnoreVersionMismatch(boolean ignoreVersionMismatch)
If set to true than version mismatch between bundle version specified in
pom and bundle version specified in the manifest is ignored.
|
protected void |
setLogLevel(int level)
Sets felix.log.level property.
|
protected void |
setPaxArtifactUrls(String... urls)
Sets urls of pax artifacts which should be launched for integration
testing.
|
protected void |
setRunArguments(Properties p)
Sets run arguments of uAAL platform.
|
protected void |
setRunArguments(String... args)
Sets run arguments of uAAL platform.
|
protected void |
setUseOnlyLocalRepo(boolean useOnlyLocalRepo)
Sets flag which can force mvn url handler to look up only local maven
repository.
|
getBundleContentPattern, getDefaultSettings, getManifestLocation, getRootPath, getSettings, getSettingsLocation
createDefaultManifest, createManifestOnlyFromTestClass, getManifest
getLocator, getSpringDMVersion, getSpringVersion, getTestBundlesNames, getTestFrameworkBundles, getTestFrameworkBundlesNames, getTestingFrameworkBundlesConfiguration, locateBundle, locateBundles, preProcessBundleContext
getDefaultWaitTime, isSpringDMManaged, shouldWaitForSpringBundlesContextCreation, waitOnContextCreation, waitOnContextCreation, waitOnContextCreation
createPlatform, getBootDelegationPackages
createApplicationContext, isContextKeyEmpty
getAutowireMode, injectDependencies, isDependencyCheck, isPopulateProtectedVariables, prepareTestInstance, setAutowireMode, setDependencyCheck, setPopulateProtectedVariables
contextKey, createBeanDefinitionReader, customizeBeanFactory, getApplicationContext, getConfigLocations, getConfigPath, getConfigPaths, getLoadCount, loadContext, loadContextLocations, onSetUp, onTearDown, prepareApplicationContext, setDirty, setUp, tearDown
addContext, contextKeyString, getContext, hasCachedContext, setDirty
getDisabledTestCount, isDisabledInThisEnvironment, recordDisabled
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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, runTest, setName, toString
protected IntegrationTest()
protected IntegrationTest(String eclipseLaunchConfiguration)
eclipseLaunchConfiguration
- path to the launch configuration which will be used for
setting up the OSGi platform in which TestCase will be
executed.protected void log(String logMsg)
logMsg
- Log message to be printed.protected String formatMsg(String format, Object... args)
format
- Format in accordance with String.format API.args
- Arguments to be printed in accordance with passed format.protected void logAllBundles()
protected void setLogLevel(int level)
protected void setRunArguments(String... args)
args
- Arguments have to provided as list of strings. There has to be
even number of arguments. All odd strings are interpreted as
keys and all even string are interpreted as values.protected void setRunArguments(Properties p)
p
- Properties which represent run arguments.protected void setPaxArtifactUrls(String... urls)
urls
- List of pax artifacts urls.protected void setBundleConfLocation(String path)
path
- Path to which bundles.configuration.location is to be set.protected void setUseOnlyLocalRepo(boolean useOnlyLocalRepo)
useOnlyLocalRepo
- protected void setIgnoreLastBudnle(boolean ignoreLast)
ignoreLast
- public void setIgnoreVersionMismatch(boolean ignoreVersionMismatch)
protected String getPlatformName()
getPlatformName
in class org.springframework.osgi.test.AbstractConfigurableOsgiTests
protected void postProcessBundleContext(org.osgi.framework.BundleContext context) throws Exception
postProcessBundleContext
in class org.springframework.osgi.test.AbstractConfigurableBundleCreatorTests
Exception
protected org.springframework.core.io.Resource[] getTestBundles()
getTestBundles
in class org.springframework.osgi.test.AbstractDependencyManagerTests
Copyright © 2018 universAAL Consortium. All rights reserved.