CELIX-311: Apply broken framework test path

Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/e5acd906
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/e5acd906
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/e5acd906

Branch: refs/heads/develop
Commit: e5acd9069b24558172658a6b487d8f85c2c11be9
Parents: f1759bd
Author: Pepijn Noltes <pepijnnol...@gmail.com>
Authored: Fri Nov 27 15:58:50 2015 +0100
Committer: Pepijn Noltes <pepijnnol...@gmail.com>
Committed: Fri Nov 27 15:58:50 2015 +0100

----------------------------------------------------------------------
 framework/CMakeLists.txt                       | 1 +
 framework/private/mock/bundle_context_mock.c   | 7 +++++++
 framework/private/mock/service_registry_mock.c | 5 +++++
 3 files changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/e5acd906/framework/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/framework/CMakeLists.txt b/framework/CMakeLists.txt
index 610854e..cd33d09 100644
--- a/framework/CMakeLists.txt
+++ b/framework/CMakeLists.txt
@@ -129,6 +129,7 @@ if (FRAMEWORK)
             private/test/bundle_context_test.cpp
             private/mock/bundle_mock.c
             private/mock/framework_mock.c
+            private/mock/service_registry_mock.c
             private/src/bundle_context.c
             private/src/celix_errorcodes.c
             private/mock/celix_log_mock.c)

http://git-wip-us.apache.org/repos/asf/celix/blob/e5acd906/framework/private/mock/bundle_context_mock.c
----------------------------------------------------------------------
diff --git a/framework/private/mock/bundle_context_mock.c 
b/framework/private/mock/bundle_context_mock.c
index 0e5ea6d..2796ae8 100644
--- a/framework/private/mock/bundle_context_mock.c
+++ b/framework/private/mock/bundle_context_mock.c
@@ -111,6 +111,13 @@ celix_status_t 
bundleContext_getServiceReference(bundle_context_pt context, char
        return mock_c()->returnValue().value.intValue;
 }
 
+celix_status_t bundleContext_retainServiceReference(bundle_context_pt context, 
service_reference_pt reference) {
+    mock_c()->actualCall("bundleContext_retainServiceReference")
+            ->withPointerParameters("context", context)
+            ->withPointerParameters("reference", reference);
+    return mock_c()->returnValue().value.intValue;
+}
+
 celix_status_t bundleContext_ungetServiceReference(bundle_context_pt context, 
service_reference_pt reference) {
     mock_c()->actualCall("bundleContext_ungetServiceReference")
             ->withPointerParameters("context", context)

http://git-wip-us.apache.org/repos/asf/celix/blob/e5acd906/framework/private/mock/service_registry_mock.c
----------------------------------------------------------------------
diff --git a/framework/private/mock/service_registry_mock.c 
b/framework/private/mock/service_registry_mock.c
index af877ef..5c6cef3 100644
--- a/framework/private/mock/service_registry_mock.c
+++ b/framework/private/mock/service_registry_mock.c
@@ -101,6 +101,11 @@ celix_status_t 
serviceRegistry_getServiceReferences(service_registry_pt registry
        return mock_c()->returnValue().value.intValue;
 }
 
+celix_status_t serviceRegistry_retainServiceReference(service_registry_pt 
registry, bundle_pt bundle, service_reference_pt reference) {
+       mock_c()->actualCall("serviceRegistry_retainServiceReference");
+       return mock_c()->returnValue().value.intValue;
+}
+
 celix_status_t serviceRegistry_ungetServiceReference(service_registry_pt 
registry, bundle_pt bundle, service_reference_pt reference) {
        mock_c()->actualCall("serviceRegistry_ungetServiceReference");
        return mock_c()->returnValue().value.intValue;

Reply via email to