Thiyagarajan Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 1 | /* |
| 2 | Copyright (C) 2018 Open Networking Foundation |
| 3 | |
| 4 | This program is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU General Public License as published by |
| 6 | the Free Software Foundation, either version 3 of the License, or |
| 7 | (at your option) any later version. |
| 8 | |
| 9 | This program is distributed in the hope that it will be useful, |
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | GNU General Public License for more details. |
| 13 | |
| 14 | You should have received a copy of the GNU General Public License |
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | */ |
| 17 | |
| 18 | #ifndef __BAL_MOCKER_H__ |
| 19 | #define __BAL_MOCKER_H__ |
| 20 | #include <cmock/cmock.h> |
Jason Huang | bf45ffb | 2019-10-30 17:29:02 +0800 | [diff] [blame] | 21 | #include <gmock-global/gmock-global.h> |
Thiyagarajan Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 22 | #include <cstdlib> |
Jason Huang | bf45ffb | 2019-10-30 17:29:02 +0800 | [diff] [blame] | 23 | #include <grpc++/grpc++.h> |
| 24 | using grpc::Status; |
Thiyagarajan Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 25 | extern "C" { |
| 26 | #include <bcmos_system.h> |
| 27 | #include <bcmolt_api.h> |
| 28 | #include <bcm_dev_log.h> |
| 29 | #include "bcmos_errno.h" |
| 30 | #include "bcmolt_system_types_typedefs.h" |
| 31 | #include "bcmolt_msg.h" |
| 32 | |
| 33 | /** Host subsystem initialization parameters */ |
| 34 | typedef struct bcmolt_host_init_parms |
| 35 | { |
| 36 | int dummy; |
| 37 | } bcmolt_host_init_parms; |
| 38 | |
| 39 | } |
| 40 | |
| 41 | class BalMocker : public CMockMocker<BalMocker> |
| 42 | { |
| 43 | public: |
| 44 | MOCK_METHOD1(bcmolt_host_init, bcmos_errno(bcmolt_host_init_parms*)); |
| 45 | MOCK_METHOD2(bcmolt_cfg_get, bcmos_errno(bcmolt_oltid, bcmolt_cfg*)); |
| 46 | MOCK_METHOD2(bcmolt_oper_submit, bcmos_errno(bcmolt_oltid, bcmolt_oper*)); |
Jason Huang | bf45ffb | 2019-10-30 17:29:02 +0800 | [diff] [blame] | 47 | // Add more here |
Thiyagarajan Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 48 | }; |
Jason Huang | bf45ffb | 2019-10-30 17:29:02 +0800 | [diff] [blame] | 49 | |
Thiyagarajan Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 50 | #endif |