You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by pn...@apache.org on 2019/02/26 13:02:34 UTC
[celix] branch develop updated: CELIX-460: Fixes test setup
This is an automated email from the ASF dual-hosted git repository.
pnoltes pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/celix.git
The following commit(s) were added to refs/heads/develop by this push:
new 5017737 CELIX-460: Fixes test setup
5017737 is described below
commit 50177376f75772e6ff7875be690630192ab106de
Author: Pepijn Noltes <pe...@gmail.com>
AuthorDate: Tue Feb 26 14:01:36 2019 +0100
CELIX-460: Fixes test setup
---
libs/framework/CMakeLists.txt | 3 ++-
libs/framework/private/mock/bundle_context_mock.c | 8 ++++++++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/libs/framework/CMakeLists.txt b/libs/framework/CMakeLists.txt
index f83dd5e..4e24a93 100644
--- a/libs/framework/CMakeLists.txt
+++ b/libs/framework/CMakeLists.txt
@@ -185,7 +185,8 @@ if (ENABLE_TESTING AND FRAMEWORK_TESTS)
private/mock/service_tracker_stub.c
src/celix_errorcodes.c
private/mock/celix_log_mock.c
- src/framework.c)
+ src/framework.c
+ src/celix_library_loader.c)
target_link_libraries(framework_test ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY} ${UUID} Celix::utils pthread dl)
add_executable(manifest_parser_test
diff --git a/libs/framework/private/mock/bundle_context_mock.c b/libs/framework/private/mock/bundle_context_mock.c
index 15e4fe9..695c918 100644
--- a/libs/framework/private/mock/bundle_context_mock.c
+++ b/libs/framework/private/mock/bundle_context_mock.c
@@ -360,4 +360,12 @@ celix_array_list_t* celix_bundleContext_findServicesWithOptions(celix_bundle_con
->withPointerParameters("ctx", ctx)
->withConstPointerParameters("opts", opts);
return mock_c()->returnValue().value.pointerValue;
+}
+
+bool celix_bundleContext_getPropertyAsBool(celix_bundle_context_t *ctx, const char *key, bool defaultValue) {
+ mock_c()->actualCall("celix_bundleContext_getPropertyAsBool")
+ ->withPointerParameters("ctx", ctx)
+ ->withStringParameters("key", key)
+ ->withBoolParameters("defaultValue", defaultValue);
+ return mock_c()->returnValue().value.boolValue;
}
\ No newline at end of file