To test alias appid feature, new testcases are added.
Adds:
- aul_set_alias_appid_test
- aul_unset_alias_appid_test
- aul_enable_alias_info_test
- aul_disable_alias_info_test
Change-Id: Ib9f99c28963a3ec7c8723b7f91cab644972cfa3a
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
--- /dev/null
+/*
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "include/aul.h"
+
+#include "aul_test.hh"
+#include "log_private.hh"
+
+namespace aul_test {
+
+class AulDisableAliasInfoTest : public AulTest {
+ public:
+ AulDisableAliasInfoTest()
+ : AulTest("disable_alias_info", "aul_disable_alias_info",
+ "disable_alias_info <appid>") {}
+
+ virtual ~AulDisableAliasInfoTest() {}
+
+ void SetUp() override {}
+
+ void TearDown() override {}
+
+ int Test(int argc, char** argv) override {
+ if (argc < 3) {
+ Usage();
+ return -1;
+ }
+
+ _D("[aul_disable_alias_info test] %s", argv[2]);
+ return aul_disable_alias_info(argv[2]);
+ }
+};
+
+AUL_TEST_REGISTER(AulDisableAliasInfoTest, disable_alias_info_test);
+
+} // namespace aul_test
--- /dev/null
+/*
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "include/aul.h"
+
+#include "aul_test.hh"
+#include "log_private.hh"
+
+namespace aul_test {
+
+class AulEnableAliasInfoTest : public AulTest {
+ public:
+ AulEnableAliasInfoTest()
+ : AulTest("enable_alias_info", "aul_enable_alias_info",
+ "enable_alias_info <appid>") {}
+
+ virtual ~AulEnableAliasInfoTest() {}
+
+ void SetUp() override {}
+
+ void TearDown() override {}
+
+ int Test(int argc, char** argv) override {
+ if (argc < 3) {
+ Usage();
+ return -1;
+ }
+
+ _D("[aul_enable_alias_info test] %s", argv[2]);
+ return aul_enable_alias_info(argv[2]);
+ }
+};
+
+AUL_TEST_REGISTER(AulEnableAliasInfoTest, enable_alias_info_test);
+
+} // namespace aul_test
--- /dev/null
+/*
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "include/aul.h"
+
+#include "aul_test.hh"
+#include "log_private.hh"
+
+namespace aul_test {
+
+class AulSetAliasAppidTest : public AulTest {
+ public:
+ AulSetAliasAppidTest()
+ : AulTest("set_alias_appid", "aul_set_alias_appid",
+ "set_alias_appid <alias_appid> <appid>") {}
+
+ virtual ~AulSetAliasAppidTest() {}
+
+ void SetUp() override {}
+
+ void TearDown() override {}
+
+ int Test(int argc, char** argv) override {
+ if (argc < 4) {
+ Usage();
+ return -1;
+ }
+
+ _D("[aul_set_alias_appid test] %s %s", argv[2], argv[3]);
+ return aul_set_alias_appid(argv[2], argv[3]);
+ }
+};
+
+AUL_TEST_REGISTER(AulSetAliasAppidTest, set_alias_appid_test);
+
+} // namespace aul_test
--- /dev/null
+/*
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "include/aul.h"
+
+#include "aul_test.hh"
+#include "log_private.hh"
+
+namespace aul_test {
+
+class AulUnsetAliasAppidTest : public AulTest {
+ public:
+ AulUnsetAliasAppidTest()
+ : AulTest("unset_alias_appid", "aul_unset_alias_appid",
+ "unset_alias_appid <alias_appid>") {}
+
+ virtual ~AulUnsetAliasAppidTest() {}
+
+ void SetUp() override {}
+
+ void TearDown() override {}
+
+ int Test(int argc, char** argv) override {
+ if (argc < 3) {
+ Usage();
+ return -1;
+ }
+
+ _D("[aul_unset_alias_appid test] %s", argv[2]);
+ return aul_unset_alias_appid(argv[2]);
+ }
+};
+
+AUL_TEST_REGISTER(AulUnsetAliasAppidTest, unset_alias_appid_test);
+
+} // namespace aul_test