--- /dev/null
+/*
+* Copyright © 2021 Samsung Electronics co., Ltd. All Rights Reserved.
+*
+* Permission is hereby granted, free of charge, to any person obtaining a
+* copy of this software and associated documentation files (the "Software"),
+* to deal in the Software without restriction, including without limitation
+* the rights to use, copy, modify, merge, publish, distribute, sublicense,
+* and/or sell copies of the Software, and to permit persons to whom the
+* Software is furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice (including the next
+* paragraph) shall be included in all copies or substantial portions of the
+* Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+* DEALINGS IN THE SOFTWARE.
+*/
+
+#include "main.h"
+
+int main(int argc, char **argv)
+{
+ auto testResults = false;
+
+ try
+ {
+ ::testing::InitGoogleMock(&argc, argv);
+ ::testing::FLAGS_gtest_death_test_style = "fast";
+ }
+ catch ( ... )
+ {
+ PRINT("Error occurred while trying to initialize GoogleTest.\n");
+ exit(EXIT_FAILURE);
+ }
+
+ try
+ {
+ testResults = (RUN_ALL_TESTS() == 0) ? true : false;
+ }
+ catch (const ::testing::internal::GoogleTestFailureException &e)
+ {
+ testResults = false;
+ PRINT("GoogleTestFailureException has been thrown: %s\n", e.what());
+ }
+
+ return testResults;
+}
+
--- /dev/null
+/*
+* Copyright © 2021 Samsung Electronics co., Ltd. All Rights Reserved.
+*
+* Permission is hereby granted, free of charge, to any person obtaining a
+* copy of this software and associated documentation files (the "Software"),
+* to deal in the Software without restriction, including without limitation
+* the rights to use, copy, modify, merge, publish, distribute, sublicense,
+* and/or sell copies of the Software, and to permit persons to whom the
+* Software is furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice (including the next
+* paragraph) shall be included in all copies or substantial portions of the
+* Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+* DEALINGS IN THE SOFTWARE.
+*/
+
+#ifndef __MMI_KEYBOARD_PROVIDER_TESTS_H__
+#define __MMI_KEYBOARD_PROVIDER_TESTS_H__
+
+#include <stdio.h>
+#include <gmock/gmock.h>
+#include <Ecore.h>
+
+#define PRINT printf
+
+using ::testing::TestWithParam;
+using ::testing::Bool;
+using ::testing::Values;
+using ::testing::Combine;
+
+#endif //__MMI_KEYBOARD_PROVIDER_TESTS_H__
--- /dev/null
+/*
+* Copyright © 2021 Samsung Electronics co., Ltd. All Rights Reserved.
+*
+* Permission is hereby granted, free of charge, to any person obtaining a
+* copy of this software and associated documentation files (the "Software"),
+* to deal in the Software without restriction, including without limitation
+* the rights to use, copy, modify, merge, publish, distribute, sublicense,
+* and/or sell copies of the Software, and to permit persons to whom the
+* Software is furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice (including the next
+* paragraph) shall be included in all copies or substantial portions of the
+* Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+* DEALINGS IN THE SOFTWARE.
+*/
+
+#include "main.h"
+
+extern "C" {
+#include "mmi-keyboard-provider.h"
+}
+
+#include <Ecore.h>
+#include <string.h>
+#include <gtest/gtest.h>
+
+class MMIKeyboardProviderTest : public ::testing::Test
+{
+public:
+ void SetUp(void) override
+ {
+ ecore_init();
+ }
+
+ void TearDown(void) override
+ {
+ ecore_shutdown();
+ }
+};
+
+
+TEST_F(MMIKeyboardProviderTest, MMIKeyboardProviderSetGetMode)
+{
+ bool r = false;
+ mmi_provider_op_mode op_mode = MODALITY_PROVIDER_MODE_NONE;
+
+ r = keyboard_set_mode(MODALITY_PROVIDER_MODE_PROPAGATE_EVENT);
+ EXPECT_EQ(r, true);
+
+ op_mode = keyboard_get_mode();
+ EXPECT_EQ(op_mode, MODALITY_PROVIDER_MODE_PROPAGATE_EVENT);
+}
+
+TEST_F(MMIKeyboardProviderTest, MMIKeyboardProviderSetModeFail)
+{
+ bool r = false;
+
+ r = keyboard_set_mode(MODALITY_PROVIDER_MODE_NONE);
+ EXPECT_EQ(r, false);
+}
\ No newline at end of file