FPRINTF("[Line : %d][%s] TEST SUIT start-up: ITs_App_Manager_p\\n", __LINE__, API_NAMESPACE);
#endif
- TCT_CheckInstalledApp(2, TEST_TESTAPPLICATION_APPID, TEST_APPMANAGERTESTFILE_APPID);
+ //TCT_CheckInstalledApp(2, TEST_TESTAPPLICATION_APPID, TEST_APPMANAGERTESTFILE_APPID);
+ TCT_CheckInstalledApp(3, TEST_TESTAPPLICATION_APPID, TEST_APPMANAGERTESTFILE_APPID, TEST_COMPONENTBASED_APPID);
sleep(2);
int nRet = APP_MANAGER_ERROR_NONE;
* @type auto
* @since_tizen 4.0
* @description Gets the application component type.
-* @scenario Gets the application component type.
+* @scenario Gets the application component type and compare with expected value.
* @apicovered app_info_get_app_component_type
-* @passcase If app_info_get_app_component_type returns success
-* @failcase If app_info_get_app_component_type or any precondition api returns fail
+* @passcase If app_info_get_app_component_type returns success or type matches
+* @failcase If app_info_get_app_component_type or any precondition api returns fail or type mismatch
* @precondition app manager instance should be created
* @postcondition app manager instance should be destroyed
*/
{
START_TEST;
- app_info_h pstAppInfoHandle = NULL;
+ const char *AppIDs[] =
+ {
+ TEST_TESTAPPLICATION_APPID,
+ TEST_COMPONENTBASED_APPID
+ };
+
+ app_info_app_component_type_e eAPP_COMP_TYPE[] =
+ {
+ APP_INFO_APP_COMPONENT_TYPE_UI_APP,
+ APP_INFO_APP_COMPONENT_TYPE_COMPONENT_BASED_APP
+ };
+
+ app_info_h hAppInfo = NULL;
app_info_app_component_type_e eGetComponent;
+ int nRet = APP_MANAGER_ERROR_NONE;
+ int nLoopCnt, nLoopSize;
- int nRet = app_manager_get_app_info((const char *)TEST_TESTAPPLICATION_APPID, &pstAppInfoHandle);
- PRINT_RESULT(APP_MANAGER_ERROR_NONE, nRet, "app_manager_get_app_info", AppManagerGetError(nRet));
- CHECK_HANDLE(pstAppInfoHandle, "app_manager_get_app_info");
+ nLoopSize = sizeof(AppIDs)/sizeof(AppIDs[0]);
- nRet = app_info_get_app_component_type(pstAppInfoHandle, &eGetComponent);
- PRINT_RESULT_CLEANUP(APP_MANAGER_ERROR_NONE, nRet, "app_info_get_component_type", AppManagerGetError(nRet),app_info_destroy(pstAppInfoHandle));
- FPRINTF("eGetComponent value is = [%s] \\n" ,AppManagerGetAppComponent(eGetComponent));
+ for (nLoopCnt = 0; nLoopCnt < nLoopSize; nLoopCnt++)
+ {
+ nRet = app_manager_get_app_info((const char *)AppIDs[nLoopCnt], &hAppInfo);
+ PRINT_RESULT(APP_MANAGER_ERROR_NONE, nRet, "app_manager_get_app_info", AppManagerGetError(nRet));
+ CHECK_HANDLE(hAppInfo, "app_manager_get_app_info");
- nRet = app_info_destroy(pstAppInfoHandle);
- PRINT_RESULT_NORETURN(APP_MANAGER_ERROR_NONE, nRet, "app_info_destroy", AppManagerGetError(nRet));
+ nRet = app_info_get_app_component_type(hAppInfo, &eGetComponent);
+ PRINT_RESULT_CLEANUP(APP_MANAGER_ERROR_NONE, nRet, "app_info_get_component_type", AppManagerGetError(nRet),app_info_destroy(hAppInfo));
+ PRINT_RESULT_CLEANUP(eAPP_COMP_TYPE[nLoopCnt], eGetComponent, "app_info_get_component_type", AppManagerGetError(nRet),app_info_destroy(hAppInfo));
+ nRet = app_info_destroy(hAppInfo);
+ PRINT_RESULT_NORETURN(APP_MANAGER_ERROR_NONE, nRet, "app_info_destroy", AppManagerGetError(nRet));
+ }
return 0;
}
+
/** @} */
/** @} */