OSDN Git Service

service: Add Mock support for Daemon and CoreStack
authorArman Uguray <armansito@google.com>
Tue, 4 Aug 2015 19:56:56 +0000 (12:56 -0700)
committerArman Uguray <armansito@google.com>
Wed, 5 Aug 2015 19:55:28 +0000 (12:55 -0700)
commitf8881fee3d08cb50896b22adc0841223694d51d2
treeec7ec9d59c690385ecb734a6b3ab7d29594eca51
parent80caab275a4a0daface9d970e5cbc28896b64af3
service: Add Mock support for Daemon and CoreStack

This patch turns the Daemon and CoreStack classes into abstract
interfaces. Mock and real implementations are implemented in special
subclasses and obtained via a factory method. Other test implementations
(e.g. stub) can be provided in the future.

Bug: 22532180
Change-Id: Ic3000518e5cef1c867dd803cd0bba6aab49dc596
service/core_stack.cpp
service/core_stack.h
service/daemon.cpp
service/daemon.h
service/ipc/ipc_handler_unix.cpp
service/test/mock_core_stack.h [new file with mode: 0644]
service/test/mock_daemon.h [new file with mode: 0644]