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 2018/07/17 19:53:08 UTC

celix git commit: CELIX-452: Adds missing service tracker stub for mock based framework tests

Repository: celix
Updated Branches:
  refs/heads/develop bcda87f54 -> 246369eb5


CELIX-452: Adds missing service tracker stub for mock based framework tests


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

Branch: refs/heads/develop
Commit: 246369eb52d4b5d7ac731b7f32a996134c6957f7
Parents: bcda87f
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Tue Jul 17 21:51:55 2018 +0200
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Tue Jul 17 21:51:55 2018 +0200

----------------------------------------------------------------------
 libs/framework/CMakeLists.txt                   |  1 +
 libs/framework/private/mock/framework_mock.c    |  2 +-
 .../private/mock/service_tracker_stub.c         | 24 ++++++++++++++++++++
 3 files changed, 26 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/246369eb/libs/framework/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/libs/framework/CMakeLists.txt b/libs/framework/CMakeLists.txt
index 66556b6..348f106 100644
--- a/libs/framework/CMakeLists.txt
+++ b/libs/framework/CMakeLists.txt
@@ -180,6 +180,7 @@ if (ENABLE_TESTING AND FRAMEWORK_TESTS)
         private/mock/bundle_cache_mock.c
         private/mock/manifest_mock.c
         private/mock/dm_dependency_manager_mock.c
+        private/mock/service_tracker_stub.c
         src/celix_errorcodes.c
         private/mock/celix_log_mock.c
         src/framework.c)

http://git-wip-us.apache.org/repos/asf/celix/blob/246369eb/libs/framework/private/mock/framework_mock.c
----------------------------------------------------------------------
diff --git a/libs/framework/private/mock/framework_mock.c b/libs/framework/private/mock/framework_mock.c
index eaae1eb..0a5c39a 100644
--- a/libs/framework/private/mock/framework_mock.c
+++ b/libs/framework/private/mock/framework_mock.c
@@ -343,4 +343,4 @@ service_registration_t* celix_framework_registerServiceFactory(framework_t *fw ,
 			->withPointerParameters("factory", factory)
 			->withPointerParameters("properties", properties);
 	return mock_c()->returnValue().value.pointerValue;
-}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/celix/blob/246369eb/libs/framework/private/mock/service_tracker_stub.c
----------------------------------------------------------------------
diff --git a/libs/framework/private/mock/service_tracker_stub.c b/libs/framework/private/mock/service_tracker_stub.c
new file mode 100644
index 0000000..76f777b
--- /dev/null
+++ b/libs/framework/private/mock/service_tracker_stub.c
@@ -0,0 +1,24 @@
+/**
+ *Licensed to the Apache Software Foundation (ASF) under one
+ *or more contributor license agreements.  See the NOTICE file
+ *distributed with this work for additional information
+ *regarding copyright ownership.  The ASF licenses this file
+ *to you under the Apache License, Version 2.0 (the
+ *"License"); you may not use this file except in compliance
+ *with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *Unless required by applicable law or agreed to in writing,
+ *software distributed under the License is distributed on an
+ *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ *specific language governing permissions and limitations
+ *under the License.
+ */
+
+
+#include "service_tracker.h"
+
+void celix_serviceTracker_syncForContext(void *_ignore){}
+void celix_serviceTracker_syncForFramework(void *_ignore){}
\ No newline at end of file