gtest: add testcases for asnyc API
[platform/core/api/tethering.git] / tests / mocks / tethering_vconf.c
index 4f3c0ba..05c7a26 100644 (file)
@@ -52,12 +52,13 @@ int __wrap_vconf_get_int(const char *in_key, int *intval)
        if (!tethering_mock_vconf_result)
                return -1;
 
-       if (strncmp(in_key, VCONFKEY_MOBILE_HOTSPOT_MODE,
-                               strlen(VCONFKEY_MOBILE_HOTSPOT_MODE)) == 0) {
+       if (strcmp(in_key, VCONFKEY_MOBILE_HOTSPOT_MODE) == 0) {
                *intval |= tethering_mock_enabled_state.usb ? VCONFKEY_MOBILE_HOTSPOT_MODE_USB : 0;
                *intval |= tethering_mock_enabled_state.wifi ? VCONFKEY_MOBILE_HOTSPOT_MODE_WIFI : 0;
                *intval |= tethering_mock_enabled_state.bluetooth ? VCONFKEY_MOBILE_HOTSPOT_MODE_BT : 0;
                *intval |= tethering_mock_enabled_state.p2p ? VCONFKEY_MOBILE_HOTSPOT_MODE_P2P : 0;
+       } else if (strcmp(in_key, VCONFKEY_MOBILE_HOTSPOT_SECURITY) == 0) {
+               *intval = 1; // PSK
        } else {
                *intval = 0;
        }