diff --git a/interfaces/inner_kits/test/unittest/common/ipc/distributed_hardware_proxy/src/distributed_hardware_proxy_test.cpp b/interfaces/inner_kits/test/unittest/common/ipc/distributed_hardware_proxy/src/distributed_hardware_proxy_test.cpp index fbf09771f167c4315fe3368e6cfd681f175b0821..94e9c789c47fb338396682e2dee7bec0c1307499 100644 --- a/interfaces/inner_kits/test/unittest/common/ipc/distributed_hardware_proxy/src/distributed_hardware_proxy_test.cpp +++ b/interfaces/inner_kits/test/unittest/common/ipc/distributed_hardware_proxy/src/distributed_hardware_proxy_test.cpp @@ -14,6 +14,7 @@ */ #include "distributed_hardware_proxy_test.h" + #include "dhardware_ipc_interface_code.h" #include "av_trans_errno.h" diff --git a/services/distributedhardwarefwkservice/test/unittest/common/distributedhardwarestub/include/distributed_hardware_stub_test.h b/services/distributedhardwarefwkservice/test/unittest/common/distributedhardwarestub/include/distributed_hardware_stub_test.h index c5004a1ba6b30b4e4eb94984cdeddba87766917a..b5aeba8bc0c82cf46a9c8f369c9667e3e15dffa8 100644 --- a/services/distributedhardwarefwkservice/test/unittest/common/distributedhardwarestub/include/distributed_hardware_stub_test.h +++ b/services/distributedhardwarefwkservice/test/unittest/common/distributedhardwarestub/include/distributed_hardware_stub_test.h @@ -199,6 +199,22 @@ int32_t UnLoadDistributedHDF(const DHType dhType) } }; +class MockGetDhDescriptorsCallbackStub : public IRemoteStub { +public: + void OnSuccess(const std::string &networkId, const std::vector &descriptors, + EnableStep enableStep) override + { + (void)networkId; + (void)descriptors; + (void)enableStep; + } + void OnError(const std::string &networkId, int32_t error) override + { + (void)networkId; + (void)error; + } +}; + class MockIPublisherListener : public IRemoteStub { public: void OnMessage(const DHTopic topic, const std::string& message) @@ -235,22 +251,6 @@ public: (void)dhDescriptor; } }; - -class MockGetDhDescriptorsCallbackStub : public IRemoteStub { -public: - void OnSuccess(const std::string &networkId, const std::vector &descriptors, - EnableStep enableStep) override - { - (void)networkId; - (void)descriptors; - (void)enableStep; - } - void OnError(const std::string &networkId, int32_t error) override - { - (void)networkId; - (void)error; - } -}; } // namespace DistributedHardware } // namespace OHOS #endif diff --git a/services/distributedhardwarefwkservice/test/unittest/common/transport/mock_other_method.cpp b/services/distributedhardwarefwkservice/test/unittest/common/transport/mock_other_method.cpp index 4549dd9f0c40c1c5318784c0bd5d595d14556e18..792f670e118bb082f28ad3f378282d01e64e7461 100644 --- a/services/distributedhardwarefwkservice/test/unittest/common/transport/mock_other_method.cpp +++ b/services/distributedhardwarefwkservice/test/unittest/common/transport/mock_other_method.cpp @@ -12,10 +12,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "os_account_manager.h" #include "mock_other_method.h" +#include "os_account_manager.h" + namespace OHOS { namespace AccountSA { /** diff --git a/services/distributedhardwarefwkservice/test/unittest/common/transport/mock_other_method.h b/services/distributedhardwarefwkservice/test/unittest/common/transport/mock_other_method.h index b7628f909b66222ef5f9a1613e0e88f6a80c0cac..90155c601e5b127d3ca7489ed133d5bbc315af9d 100644 --- a/services/distributedhardwarefwkservice/test/unittest/common/transport/mock_other_method.h +++ b/services/distributedhardwarefwkservice/test/unittest/common/transport/mock_other_method.h @@ -12,8 +12,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#ifndef DISRIBUTED_HARDWARE_MOCK_OTHER_METHOD_H -#define DISRIBUTED_HARDWARE_MOCK_OTHER_METHOD_H + +#ifndef DISTRIBUTED_HARDWARE_MOCK_OTHER_METHOD_H +#define DISTRIBUTED_HARDWARE_MOCK_OTHER_METHOD_H #include