Package org.osgi.test.junit5.context
Class InstalledBundleExtension
java.lang.Object
org.osgi.test.junit5.inject.InjectingExtension<InjectInstalledBundle>
org.osgi.test.junit5.context.InstalledBundleExtension
- All Implemented Interfaces:
org.junit.jupiter.api.extension.AfterAllCallback,org.junit.jupiter.api.extension.AfterEachCallback,org.junit.jupiter.api.extension.BeforeAllCallback,org.junit.jupiter.api.extension.BeforeEachCallback,org.junit.jupiter.api.extension.Extension,org.junit.jupiter.api.extension.ParameterResolver
This Extension loads a
Bundle from a given location and installs the
Bundle using the InjectInstalledBundle.
@ExtendWith(InstalledBundleExtension.class) ... @InjectInstalledBundle Bundle installedBundle;
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.osgi.framework.BundleinstalledBundleOf(InjectInstalledBundle injectBundle, org.junit.jupiter.api.extension.ExtensionContext extensionContext) protected ObjectresolveValue(TargetType targetType, InjectInstalledBundle injectBundle, org.junit.jupiter.api.extension.ExtensionContext extensionContext) Resolve the value for the specifiedTargetTypeand injection annotation for the specifiedExtensionContext.Methods inherited from class org.osgi.test.junit5.inject.InjectingExtension
afterAll, afterEach, annotation, beforeAll, beforeEach, disallowedFieldModifiers, isLifecyclePerClass, isLifecyclePerClass, resolveField, resolveParameter, supportsField, supportsParameter, supportsType, targetTypes
-
Constructor Details
-
InstalledBundleExtension
public InstalledBundleExtension()
-
-
Method Details
-
installedBundleOf
public static org.osgi.framework.Bundle installedBundleOf(InjectInstalledBundle injectBundle, org.junit.jupiter.api.extension.ExtensionContext extensionContext) -
resolveValue
protected Object resolveValue(TargetType targetType, InjectInstalledBundle injectBundle, org.junit.jupiter.api.extension.ExtensionContext extensionContext) throws org.junit.jupiter.api.extension.ParameterResolutionException Description copied from class:InjectingExtensionResolve the value for the specifiedTargetTypeand injection annotation for the specifiedExtensionContext.- Specified by:
resolveValuein classInjectingExtension<InjectInstalledBundle>- Throws:
org.junit.jupiter.api.extension.ParameterResolutionException
-