From 3d56750503a98a0bac2b87c9bf96f30d10f839cb Mon Sep 17 00:00:00 2001 From: AdityaKasar Date: Mon, 12 Aug 2024 22:55:03 +0530 Subject: [PATCH] SecureStorageTest --- .../sdk/cpptest/unit/secureStorageTest.cpp | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 src/sdks/core/src/cpp/sdk/cpptest/unit/secureStorageTest.cpp diff --git a/src/sdks/core/src/cpp/sdk/cpptest/unit/secureStorageTest.cpp b/src/sdks/core/src/cpp/sdk/cpptest/unit/secureStorageTest.cpp new file mode 100644 index 000000000..9c1b16c36 --- /dev/null +++ b/src/sdks/core/src/cpp/sdk/cpptest/unit/secureStorageTest.cpp @@ -0,0 +1,61 @@ +#include "unit.h" + + +// class SecureStorageTest : public ::testing::Test { +// protected: +// JsonEngine* jsonEngine; +// Firebolt::Error error = Firebolt::Error::None; + +// void SetUp() override +// { +// jsonEngine = new JsonEngine(); +// } + +// void TearDown() override +// { +// delete jsonEngine; +// } +// }; + + +// TEST_F(SecureStorageTest, Get) +// { +// nlohmann::json_abi_v3_11_3::json expectedValues = nlohmann::json::parse(jsonEngine->get_value("SecureStorage.get")); + +// auto value = Firebolt::IFireboltAccessor::Instance().SecureStorageInterface().get(&error); +// EXPECT_EQ(error, Firebolt::Error::None); +// EXPECT_EQ(value, actual_value); +// } + + +// TEST_F(SecureStorageTest, TestSecureStorageset) +// { + +// auto actual_value = jsonEngine->get_value("SecureStorage.set"); +// actual_value = actual_value.substr(1, actual_value.length() - 2); +// auto value = Firebolt::IFireboltAccessor::Instance().SecureStorageInterface().set(&error); +// EXPECT_EQ(error, Firebolt::Error::None); +// EXPECT_EQ(value, actual_value); +// } + + +// TEST_F(SecureStorageTest, TestSecureStorageremove) +// { + +// auto actual_value = jsonEngine->get_value("SecureStorage.remove"); +// actual_value = actual_value.substr(1, actual_value.length() - 2); +// auto value = Firebolt::IFireboltAccessor::Instance().SecureStorageInterface().remove(&error); +// EXPECT_EQ(error, Firebolt::Error::None); +// EXPECT_EQ(value, actual_value); +// } + + +// TEST_F(SecureStorageTest, TestSecureStorageclear) +// { + +// auto actual_value = jsonEngine->get_value("SecureStorage.clear"); +// actual_value = actual_value.substr(1, actual_value.length() - 2); +// auto value = Firebolt::IFireboltAccessor::Instance().SecureStorageInterface().clear(&error); +// EXPECT_EQ(error, Firebolt::Error::None); +// EXPECT_EQ(value, actual_value); +// }