• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2024 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef OHOS_UTTEST_DM_TRANSPORT_H
17 #define OHOS_UTTEST_DM_TRANSPORT_H
18 
19 #include <gtest/gtest.h>
20 #include <gmock/gmock.h>
21 #include <memory>
22 #include "dm_comm_tool.h"
23 #include "dm_transport.h"
24 
25 namespace OHOS {
26 namespace DistributedHardware {
27 class DMTransportTest : public testing::Test {
28 public:
29     static void SetUpTestCase();
30     static void TearDownTestCase();
31     void SetUp();
32     void TearDown();
33 
34 protected:
35     std::shared_ptr<DMCommTool> dmCommTool;
36     std::shared_ptr<DMCommTool> dmCommToolPtr = std::make_shared<DMCommTool>();
37     std::shared_ptr<DMTransport> dmTransport_ = std::make_shared<DMTransport>(dmCommToolPtr);
38 
39     int32_t ERR_DM_FAILED = 96929744;
40     int32_t ERR_DM_INPUT_PARA_INVALID = 96929749;
41     uint32_t MAX_SEND_MSG_LENGTH = 4 * 1024 * 1024;
42     int32_t DM_OK = 0;
43 };
44 } // namespace DistributedHardware
45 } // namespace OHOS
46 
47 #endif // OHOS_UTTEST_DM_TRANSPORT_H