|
| 1 | +/* |
| 2 | + * Copyright (c) 2021 Particle Industries, Inc. All rights reserved. |
| 3 | + * |
| 4 | + * This library is free software; you can redistribute it and/or |
| 5 | + * modify it under the terms of the GNU Lesser General Public |
| 6 | + * License as published by the Free Software Foundation, either |
| 7 | + * version 3 of the License, or (at your option) any later version. |
| 8 | + * |
| 9 | + * This library 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 GNU |
| 12 | + * Lesser General Public License for more details. |
| 13 | + * |
| 14 | + * You should have received a copy of the GNU Lesser General Public |
| 15 | + * License along with this library; if not, see <http://www.gnu.org/licenses/>. |
| 16 | + */ |
| 17 | + |
| 18 | +#include "ncp_fw_update.h" |
| 19 | +// #include "system_error.h" |
| 20 | + |
| 21 | +// #include "mock/filesystem.h" |
| 22 | +// #include "mock/ncp_fw_update.h" |
| 23 | +// #include "util/random.h" |
| 24 | + |
| 25 | +#include <catch2/catch.hpp> |
| 26 | +#include <hippomocks.h> |
| 27 | + |
| 28 | +#include <string> |
| 29 | +// #include <unordered_map> |
| 30 | + |
| 31 | + |
| 32 | +using namespace particle; |
| 33 | + |
| 34 | +TEST_CASE("SaraNcpFwUpdate") { |
| 35 | + // MockRepository mocks; |
| 36 | + SECTION("init()") { |
| 37 | + SECTION("initialize callbacks") { |
| 38 | + SaraNcpFwUpdateCallbacks saraNcpFwUpdateCallbacks; |
| 39 | + memset(&saraNcpFwUpdateCallbacks, 0, sizeof(saraNcpFwUpdateCallbacks)); |
| 40 | + // saraNcpFwUpdateCallbacks.size = sizeof(saraNcpFwUpdateCallbacks); |
| 41 | + // saraNcpFwUpdateCallbacks.system_get_flag = system_get_flag; |
| 42 | + // saraNcpFwUpdateCallbacks.spark_cloud_flag_connected = spark_cloud_flag_connected; |
| 43 | + // saraNcpFwUpdateCallbacks.spark_cloud_flag_connect = spark_cloud_flag_connect; |
| 44 | + // saraNcpFwUpdateCallbacks.spark_cloud_flag_disconnect = spark_cloud_flag_disconnect; |
| 45 | + // saraNcpFwUpdateCallbacks.publishEvent = publishEvent; |
| 46 | + // saraNcpFwUpdateCallbacks.system_mode = system_mode; |
| 47 | + // services::SaraNcpFwUpdate::instance()->init(saraNcpFwUpdateCallbacks); |
| 48 | + // CHECK(strcmp(n.init(), "path/to/file") == 0); |
| 49 | + } |
| 50 | + } |
| 51 | +} |
0 commit comments