Class ComponentContextBuilder
java.lang.Object
org.apache.sling.testing.mock.osgi.ComponentContextBuilder
Builds a mocked
ComponentContext
.-
Method Summary
Modifier and TypeMethodDescription@NotNull org.osgi.service.component.ComponentContext
build()
@NotNull ComponentContextBuilder
bundleContext
(@NotNull org.osgi.framework.BundleContext bundleContext) @NotNull ComponentContextBuilder
properties
(@NotNull Object @NotNull ... properties) @NotNull ComponentContextBuilder
properties
(@Nullable Dictionary<String, Object> properties) @NotNull ComponentContextBuilder
properties
(@Nullable Map<String, Object> properties) @NotNull ComponentContextBuilder
usingBundle
(@NotNull org.osgi.framework.Bundle usingBundle)
-
Method Details
-
bundleContext
@NotNull public @NotNull ComponentContextBuilder bundleContext(@NotNull @NotNull org.osgi.framework.BundleContext bundleContext) -
properties
@NotNull public @NotNull ComponentContextBuilder properties(@Nullable @Nullable Dictionary<String, Object> properties) -
properties
@NotNull public @NotNull ComponentContextBuilder properties(@Nullable @Nullable Map<String, Object> properties) -
properties
@NotNull public @NotNull ComponentContextBuilder properties(@NotNull @NotNull Object @NotNull ... properties) -
usingBundle
@NotNull public @NotNull ComponentContextBuilder usingBundle(@NotNull @NotNull org.osgi.framework.Bundle usingBundle) -
build
@NotNull public @NotNull org.osgi.service.component.ComponentContext build()
-