[ComponentBased][Manual][TCSACR-400] Add test for WidgetComponent 26/254426/13
authorChanggyu Choi <changyu.choi@samsung.com>
Wed, 3 Mar 2021 01:48:13 +0000 (10:48 +0900)
committerChanggyu Choi <changyu.choi@samsung.com>
Fri, 19 Mar 2021 04:04:29 +0000 (13:04 +0900)
This patch is check lifecycle of widget component.

Change-Id: Idc7b42c34ecf0c2a35a638141d2ea58ab9029bf7
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
tct-suite-vs/Resource/Tizen.ComponentBased.Manual.Tests/ComponentBasedTest.tar
tct-suite-vs/Resource/Tizen.ComponentBased.Manual.Tests/WidgetViewerApp.Tizen-1.0.0.tpk [new file with mode: 0755]
tct-suite-vs/Resource/Tizen.ComponentBased.Manual.Tests/org.tizen.example.ComponentBasedTest-1.0.0.tpk [changed mode: 0644->0755]
tct-suite-vs/Tizen.ComponentBased.Manual.Tests/Tizen.ComponentBased.Manual.Tests.sln [changed mode: 0644->0755]
tct-suite-vs/Tizen.ComponentBased.Manual.Tests/testcase/TSWidgetComponent.cs [new file with mode: 0755]
tct-suite-vs/Tizen.ComponentBased.Tests/Program.cs
tct-suite-vs/Tizen.ComponentBased.Tests/Tizen.ComponentBased.Tests.sln [changed mode: 0644->0755]
tct-suite-vs/Tizen.ComponentBased.Tests/testcase/TSComponentBasedApplication.cs [changed mode: 0644->0755]
tct-suite-vs/Tizen.ComponentBased.Tests/testcase/TSWidgetComponent.cs [new file with mode: 0755]
tct-suite-vs/nunitlite/nunitlite.csproj [changed mode: 0644->0755]

index e234a25..59ebd01 100644 (file)
Binary files a/tct-suite-vs/Resource/Tizen.ComponentBased.Manual.Tests/ComponentBasedTest.tar and b/tct-suite-vs/Resource/Tizen.ComponentBased.Manual.Tests/ComponentBasedTest.tar differ
diff --git a/tct-suite-vs/Resource/Tizen.ComponentBased.Manual.Tests/WidgetViewerApp.Tizen-1.0.0.tpk b/tct-suite-vs/Resource/Tizen.ComponentBased.Manual.Tests/WidgetViewerApp.Tizen-1.0.0.tpk
new file mode 100755 (executable)
index 0000000..2bcc3cf
Binary files /dev/null and b/tct-suite-vs/Resource/Tizen.ComponentBased.Manual.Tests/WidgetViewerApp.Tizen-1.0.0.tpk differ
old mode 100644 (file)
new mode 100755 (executable)
index fcc6c77..de96cb8
Binary files a/tct-suite-vs/Resource/Tizen.ComponentBased.Manual.Tests/org.tizen.example.ComponentBasedTest-1.0.0.tpk and b/tct-suite-vs/Resource/Tizen.ComponentBased.Manual.Tests/org.tizen.example.ComponentBasedTest-1.0.0.tpk differ
old mode 100644 (file)
new mode 100755 (executable)
index 8ccd044..1552cac
@@ -1,92 +1,49 @@
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26730.15
-MinimumVisualStudioVersion = 15.0.26124.0
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.ComponentBased.Manual.Tests", "Tizen.ComponentBased.Manual.Tests.csproj", "{D92BEEAC-3B2A-45F8-8C53-53B92550404A}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nunit.framework", "..\nunit.framework\nunit.framework.csproj", "{B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nunitlite", "..\nunitlite\nunitlite.csproj", "{FDB8025A-C029-461F-895E-287B4C65939B}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ManualTemplate", "..\Template\ManualTemplate\ManualTemplate.csproj", "{269F89A7-E648-4811-8421-844E00ACF5F0}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ManualTemplateForWearable", "..\Template\ManualTemplateForWearable\ManualTemplateForWearable.csproj", "{D36CED01-29BD-4EB3-8903-62E0BF2A822D}"
-EndProject
-Global
-  GlobalSection(SolutionConfigurationPlatforms) = preSolution
-    Debug|Any CPU = Debug|Any CPU
-    Debug|x64 = Debug|x64
-    Debug|x86 = Debug|x86
-    Release|Any CPU = Release|Any CPU
-    Release|x64 = Release|x64
-    Release|x86 = Release|x86
-  EndGlobalSection
-  GlobalSection(ProjectConfigurationPlatforms) = postSolution
-    {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-    {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|Any CPU.Build.0 = Debug|Any CPU
-    {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|x64.ActiveCfg = Debug|Any CPU
-    {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|x64.Build.0 = Debug|Any CPU
-    {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|x86.ActiveCfg = Debug|Any CPU
-    {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|x86.Build.0 = Debug|Any CPU
-    {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|Any CPU.ActiveCfg = Release|Any CPU
-    {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|Any CPU.Build.0 = Release|Any CPU
-    {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|x64.ActiveCfg = Release|Any CPU
-    {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|x64.Build.0 = Release|Any CPU
-    {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|x86.ActiveCfg = Release|Any CPU
-    {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|x86.Build.0 = Release|Any CPU
-    {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-    {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|Any CPU.Build.0 = Debug|Any CPU
-    {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|x64.ActiveCfg = Debug|Any CPU
-    {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|x64.Build.0 = Debug|Any CPU
-    {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|x86.ActiveCfg = Debug|Any CPU
-    {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|x86.Build.0 = Debug|Any CPU
-    {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|Any CPU.ActiveCfg = Release|Any CPU
-    {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|Any CPU.Build.0 = Release|Any CPU
-    {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|x64.ActiveCfg = Release|Any CPU
-    {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|x64.Build.0 = Release|Any CPU
-    {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|x86.ActiveCfg = Release|Any CPU
-    {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|x86.Build.0 = Release|Any CPU
-    {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-    {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|Any CPU.Build.0 = Debug|Any CPU
-    {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|x64.ActiveCfg = Debug|Any CPU
-    {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|x64.Build.0 = Debug|Any CPU
-    {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|x86.ActiveCfg = Debug|Any CPU
-    {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|x86.Build.0 = Debug|Any CPU
-    {FDB8025A-C029-461F-895E-287B4C65939B}.Release|Any CPU.ActiveCfg = Release|Any CPU
-    {FDB8025A-C029-461F-895E-287B4C65939B}.Release|Any CPU.Build.0 = Release|Any CPU
-    {FDB8025A-C029-461F-895E-287B4C65939B}.Release|x64.ActiveCfg = Release|Any CPU
-    {FDB8025A-C029-461F-895E-287B4C65939B}.Release|x64.Build.0 = Release|Any CPU
-    {FDB8025A-C029-461F-895E-287B4C65939B}.Release|x86.ActiveCfg = Release|Any CPU
-    {FDB8025A-C029-461F-895E-287B4C65939B}.Release|x86.Build.0 = Release|Any CPU
-    {269F89A7-E648-4811-8421-844E00ACF5F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-    {269F89A7-E648-4811-8421-844E00ACF5F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
-    {269F89A7-E648-4811-8421-844E00ACF5F0}.Debug|x64.ActiveCfg = Debug|Any CPU
-    {269F89A7-E648-4811-8421-844E00ACF5F0}.Debug|x64.Build.0 = Debug|Any CPU
-    {269F89A7-E648-4811-8421-844E00ACF5F0}.Debug|x86.ActiveCfg = Debug|Any CPU
-    {269F89A7-E648-4811-8421-844E00ACF5F0}.Debug|x86.Build.0 = Debug|Any CPU
-    {269F89A7-E648-4811-8421-844E00ACF5F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
-    {269F89A7-E648-4811-8421-844E00ACF5F0}.Release|Any CPU.Build.0 = Release|Any CPU
-    {269F89A7-E648-4811-8421-844E00ACF5F0}.Release|x64.ActiveCfg = Release|Any CPU
-    {269F89A7-E648-4811-8421-844E00ACF5F0}.Release|x64.Build.0 = Release|Any CPU
-    {269F89A7-E648-4811-8421-844E00ACF5F0}.Release|x86.ActiveCfg = Release|Any CPU
-    {269F89A7-E648-4811-8421-844E00ACF5F0}.Release|x86.Build.0 = Release|Any CPU
-    {D36CED01-29BD-4EB3-8903-62E0BF2A822D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-    {D36CED01-29BD-4EB3-8903-62E0BF2A822D}.Debug|Any CPU.Build.0 = Debug|Any CPU
-    {D36CED01-29BD-4EB3-8903-62E0BF2A822D}.Debug|x64.ActiveCfg = Debug|Any CPU
-    {D36CED01-29BD-4EB3-8903-62E0BF2A822D}.Debug|x64.Build.0 = Debug|Any CPU
-    {D36CED01-29BD-4EB3-8903-62E0BF2A822D}.Debug|x86.ActiveCfg = Debug|Any CPU
-    {D36CED01-29BD-4EB3-8903-62E0BF2A822D}.Debug|x86.Build.0 = Debug|Any CPU
-    {D36CED01-29BD-4EB3-8903-62E0BF2A822D}.Release|Any CPU.ActiveCfg = Release|Any CPU
-    {D36CED01-29BD-4EB3-8903-62E0BF2A822D}.Release|Any CPU.Build.0 = Release|Any CPU
-    {D36CED01-29BD-4EB3-8903-62E0BF2A822D}.Release|x64.ActiveCfg = Release|Any CPU
-    {D36CED01-29BD-4EB3-8903-62E0BF2A822D}.Release|x64.Build.0 = Release|Any CPU
-    {D36CED01-29BD-4EB3-8903-62E0BF2A822D}.Release|x86.ActiveCfg = Release|Any CPU
-    {D36CED01-29BD-4EB3-8903-62E0BF2A822D}.Release|x86.Build.0 = Release|Any CPU
-  EndGlobalSection
-  GlobalSection(SolutionProperties) = preSolution
-    HideSolutionNode = FALSE
-  EndGlobalSection
-  GlobalSection(ExtensibilityGlobals) = postSolution
-    SolutionGuid = {ED382B91-9930-40B6-B3D7-362304C78680}
-  EndGlobalSection
-EndGlobal
+Microsoft Visual Studio Solution File, Format Version 12.00\r
+# Visual Studio Version 16\r
+VisualStudioVersion = 16.0.31005.135\r
+MinimumVisualStudioVersion = 15.0.26124.0\r
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.ComponentBased.Manual.Tests", "Tizen.ComponentBased.Manual.Tests.csproj", "{D92BEEAC-3B2A-45F8-8C53-53B92550404A}"\r
+EndProject\r
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nunit.framework", "..\nunit.framework\nunit.framework.csproj", "{B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}"\r
+EndProject\r
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nunitlite", "..\nunitlite\nunitlite.csproj", "{FDB8025A-C029-461F-895E-287B4C65939B}"\r
+EndProject\r
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ManualTemplate", "..\Template\ManualTemplate\ManualTemplate.csproj", "{269F89A7-E648-4811-8421-844E00ACF5F0}"\r
+EndProject\r
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ManualTemplateForWearable", "..\Template\ManualTemplateForWearable\ManualTemplateForWearable.csproj", "{D36CED01-29BD-4EB3-8903-62E0BF2A822D}"\r
+EndProject\r
+Global\r
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+               Debug|Any CPU = Debug|Any CPU\r
+               Release|Any CPU = Release|Any CPU\r
+       EndGlobalSection\r
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+               {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+               {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+               {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+               {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|Any CPU.Build.0 = Release|Any CPU\r
+               {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+               {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+               {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+               {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|Any CPU.Build.0 = Release|Any CPU\r
+               {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+               {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+               {FDB8025A-C029-461F-895E-287B4C65939B}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+               {FDB8025A-C029-461F-895E-287B4C65939B}.Release|Any CPU.Build.0 = Release|Any CPU\r
+               {269F89A7-E648-4811-8421-844E00ACF5F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+               {269F89A7-E648-4811-8421-844E00ACF5F0}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+               {269F89A7-E648-4811-8421-844E00ACF5F0}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+               {269F89A7-E648-4811-8421-844E00ACF5F0}.Release|Any CPU.Build.0 = Release|Any CPU\r
+               {D36CED01-29BD-4EB3-8903-62E0BF2A822D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+               {D36CED01-29BD-4EB3-8903-62E0BF2A822D}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+               {D36CED01-29BD-4EB3-8903-62E0BF2A822D}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+               {D36CED01-29BD-4EB3-8903-62E0BF2A822D}.Release|Any CPU.Build.0 = Release|Any CPU\r
+       EndGlobalSection\r
+       GlobalSection(SolutionProperties) = preSolution\r
+               HideSolutionNode = FALSE\r
+       EndGlobalSection\r
+       GlobalSection(ExtensibilityGlobals) = postSolution\r
+                   SolutionGuid = {ED382B91-9930-40B6-B3D7-362304C78680}\r
+               SolutionGuid = {340A8175-D037-4D9E-B97B-BF1F37A6447E}\r
+       EndGlobalSection\r
+EndGlobal\r
diff --git a/tct-suite-vs/Tizen.ComponentBased.Manual.Tests/testcase/TSWidgetComponent.cs b/tct-suite-vs/Tizen.ComponentBased.Manual.Tests/testcase/TSWidgetComponent.cs
new file mode 100755 (executable)
index 0000000..42538d5
--- /dev/null
@@ -0,0 +1,279 @@
+/*\r
+ *  Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ *  Licensed under the Apache License, Version 2.0 (the "License");\r
+ *  you may not use this file except in compliance with the License.\r
+ *  You may obtain a copy of the License at\r
+ *\r
+ *      http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ *  Unless required by applicable law or agreed to in writing, software\r
+ *  distributed under the License is distributed on an "AS IS" BASIS,\r
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ *  See the License for the specific language governing permissions and\r
+ *  limitations under the License\r
+ */\r
+\r
+using System;\r
+using System.Threading.Tasks;\r
+using NUnit.Framework;\r
+using NUnit.Framework.TUnit;\r
+using Tizen.Applications;\r
+using Xamarin.Forms;\r
+\r
+namespace Tizen.ComponentBasedApplication.Tests\r
+{\r
+    [TestFixture]\r
+    [Description("Tizen.Applications.ComponentBasedApplication widget component test")]\r
+    public class WidgetComponentTests\r
+    {\r
+        private TestPage _testPage = TestPage.GetInstance();\r
+        private Button _comp_button;\r
+        private string _testAppId = "org.tizen.example.WidgetViewerApp.Tizen";\r
+        private bool _isMobile = false;\r
+        private bool _isWearable = false;\r
+        private bool _isEmulator = false;\r
+\r
+        [SetUp]\r
+        public void Init()\r
+        {\r
+            LogUtils.Write(LogUtils.INFO, LogUtils.TAG, "Preconditions for each TEST");\r
+            _isMobile = ManualTest.IsMobile();\r
+            _isWearable = ManualTest.IsWearable();\r
+            _isEmulator = ManualTest.IsEmulator();\r
+            _comp_button = new Button();\r
+        }\r
+\r
+        [TearDown]\r
+        public void Destroy()\r
+        {\r
+            LogUtils.Write(LogUtils.INFO, LogUtils.TAG, "Postconditions for each TEST");\r
+            _comp_button = null;\r
+        }\r
+\r
+        private void CreateCompButton(string btnText)\r
+        {\r
+            LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "CreateButton");\r
+            var layout = new StackLayout()\r
+            {\r
+                IsVisible = true,\r
+                HorizontalOptions = LayoutOptions.FillAndExpand,\r
+                VerticalOptions = LayoutOptions.FillAndExpand,\r
+            };\r
+\r
+            _comp_button = new Button()\r
+            {\r
+                Text = btnText,\r
+                VerticalOptions = LayoutOptions.Center,\r
+                HorizontalOptions = LayoutOptions.FillAndExpand,\r
+            };\r
+\r
+            layout.Children.Add(_comp_button);\r
+            _testPage.ExecuteTC(layout);\r
+        }\r
+\r
+        private void OnClick(object sender, EventArgs e)\r
+        {\r
+            AppControl control = new AppControl();\r
+            control.ApplicationId = _testAppId;\r
+            control.Operation = AppControlOperations.Default;\r
+            AppControl.SendLaunchRequest(control);\r
+        }\r
+\r
+        [Test]\r
+        [Category("P1")]\r
+        [Description("MANUAL TEST : CreateWindowInfo() should be called before OnCreate function is called")]\r
+        [Property("SPEC", "Tizen.Applications.ComponentBased.Common.WidgetComponent.CreateWindowInfo M")]\r
+        [Property("SPEC_URL", "-")]\r
+        [Property("CRITERIA", "MR")]\r
+        [Property("AUTHOR", "ChangGyu Choi, changyu.choi@samsung.com")]\r
+        [Precondition(1, "Enter command \"sdb dlog -c\" to clear log")]\r
+        [Precondition(2, "Enter command \"sdb dlog ComponentBasedTest\" to terminal")]\r
+        [Step(1, "Click run TC")]\r
+        [Step(2, "Press 'Click me' button")]\r
+        [Step(3, "Check if log show \"ComponentBasedTest: CreateWindowInfo success\" before \"ComponentBasedTest: OnCreate\".")]\r
+        [Postcondition(1, "Close the terminal")]\r
+        public async Task CreateWindowInfo_MANUAL_TEST()\r
+        {\r
+            CreateCompButton("Click me!!");\r
+            _comp_button.Clicked += OnClick;\r
+\r
+            /* TEST CODE */\r
+            await ManualTest.WaitForConfirm();\r
+            _comp_button.Clicked -= OnClick;\r
+        }\r
+\r
+        [Test]\r
+        [Category("P1")]\r
+        [Description("MANUAL TEST : OnCreate() should be called after CreateWindowInfo function is called")]\r
+        [Property("SPEC", "Tizen.Applications.ComponentBased.Common.WidgetComponent.OnCreate M")]\r
+        [Property("SPEC_URL", "-")]\r
+        [Property("CRITERIA", "MR")]\r
+        [Property("AUTHOR", "ChangGyu Choi, changyu.choi@samsung.com")]\r
+        [Precondition(1, "Enter command \"sdb dlog -c\" to clear log")]\r
+        [Precondition(2, "Enter command \"sdb dlog ComponentBasedTest\" to terminal")]\r
+        [Step(1, "Click run TC")]\r
+        [Step(2, "Press 'Click me' button")]\r
+        [Step(3, "Check if log show \"ComponentBasedTest: OnCreate\" after \"ComponentBasedTest: CreateWindowInfo success\".")]\r
+        [Postcondition(1, "Close the terminal")]\r
+        public async Task OnCreate_MANUAL_TEST()\r
+        {\r
+            CreateCompButton("Click me!!");\r
+            _comp_button.Clicked += OnClick;\r
+\r
+            /* TEST CODE */\r
+            await ManualTest.WaitForConfirm();\r
+            _comp_button.Clicked -= OnClick;\r
+        }\r
+\r
+        [Test]\r
+        [Category("P1")]\r
+        [Description("MANUAL TEST : OnDestroy() should be called after Finish function is called")]\r
+        [Property("SPEC", "Tizen.Applications.ComponentBased.Common.WidgetComponent.OnDestroy M")]\r
+        [Property("SPEC_URL", "-")]\r
+        [Property("CRITERIA", "MR")]\r
+        [Property("AUTHOR", "ChangGyu Choi, changyu.choi@samsung.com")]\r
+        [Precondition(1, "Enter command \"sdb dlog -c\" to clear log")]\r
+        [Precondition(2, "Enter command \"sdb dlog ComponentBasedTest\" to terminal")]\r
+        [Step(1, "Click run TC")]\r
+        [Step(2, "Press 'Click me' button")]\r
+        [Step(3, "Terminate \"WidgetViewerApp.Tizen\" using task-mgr")]\r
+        [Step(4, "Check if log show \"ComponentBasedTest: OnDestroy\".")]\r
+        [Postcondition(1, "Close the terminal")]\r
+        public async Task OnDestroy_MANUAL_TEST()\r
+        {\r
+            CreateCompButton("Click me!!");\r
+            _comp_button.Clicked += OnClick;\r
+\r
+            /* TEST CODE */\r
+            await ManualTest.WaitForConfirm();\r
+            _comp_button.Clicked -= OnClick;\r
+        }\r
+\r
+        [Test]\r
+        [Category("P1")]\r
+        [Description("MANUAL TEST : OnPause() should be called when the application is not visible")]\r
+        [Property("SPEC", "Tizen.Applications.ComponentBased.Common.WidgetComponent.OnPause M")]\r
+        [Property("SPEC_URL", "-")]\r
+        [Property("CRITERIA", "MR")]\r
+        [Property("AUTHOR", "ChangGyu Choi, changyu.choi@samsung.com")]\r
+        [Precondition(1, "Kill WidgetViewerApp.Tizen(AppID: org.tizen.example.WidgetViewerApp.Tizen) if app is alive.")]\r
+        [Precondition(2, "Enter command \"sdb dlog -c\" to clear log")]\r
+        [Precondition(3, "Enter command \"sdb dlog ComponentBasedTest\" to terminal")]\r
+        [Step(1, "Click run TC")]\r
+        [Step(2, "Press 'Click me' button")]\r
+        [Step(3, "Press back button after \"ComponentBasedTest: OnResume\".")]\r
+        [Step(4, "Check if log show \"ComponentBasedTest: OnPause\".")]\r
+        [Postcondition(1, "Close the terminal")]\r
+        public async Task OnPause_MANUAL_TEST()\r
+        {\r
+            CreateCompButton("Click me!!");\r
+            _comp_button.Clicked += OnClick;\r
+\r
+            /* TEST CODE */\r
+            await ManualTest.WaitForConfirm();\r
+            _comp_button.Clicked -= OnClick;\r
+        }\r
+\r
+        [Test]\r
+        [Category("P1")]\r
+        [Description("MANUAL TEST : OnResume() should be called after launch")]\r
+        [Property("SPEC", "Tizen.Applications.ComponentBased.Common.WidgetComponent.OnResume M")]\r
+        [Property("SPEC_URL", "-")]\r
+        [Property("CRITERIA", "MR")]\r
+        [Property("AUTHOR", "ChangGyu Choi, changyu.choi@samsung.com")]\r
+        [Precondition(1, "Kill WidgetViewerApp.Tizen(AppID: org.tizen.example.WidgetViewerApp.Tizen) if app is alive.")]\r
+        [Precondition(2, "Enter command \"sdb dlog -c\" to clear log")]\r
+        [Precondition(3, "Enter command \"sdb dlog ComponentBasedTest\" to terminal")]\r
+        [Precondition(4, "The device LCD should be on")]\r
+        [Step(1, "Click run TC")]\r
+        [Step(2, "Press 'Click me' button")]\r
+        [Step(3, "Check if log show \"ComponentBasedTest: OnResume\".")]\r
+        [Postcondition(1, "Close the terminal")]\r
+        public async Task OnResume_MANUAL_TEST()\r
+        {\r
+            CreateCompButton("Click me!!");\r
+            _comp_button.Clicked += OnClick;\r
+\r
+            /* TEST CODE */\r
+            await ManualTest.WaitForConfirm();\r
+            _comp_button.Clicked -= OnClick;\r
+        }\r
+\r
+        [Test]\r
+        [Category("P1")]\r
+        [Description("MANUAL TEST : OnStart() should be called after launch")]\r
+        [Property("SPEC", "Tizen.Applications.ComponentBased.Common.WidgetComponent.OnStart M")]\r
+        [Property("SPEC_URL", "-")]\r
+        [Property("CRITERIA", "MR")]\r
+        [Property("AUTHOR", "ChangGyu Choi, changyu.choi@samsung.com")]\r
+        [Precondition(1, "Kill WidgetViewerApp.Tizen(AppID: org.tizen.example.WidgetViewerApp.Tizen) if app is alive.")]\r
+        [Precondition(2, "Enter command \"sdb dlog -c\" to clear log")]\r
+        [Precondition(3, "Enter command \"sdb dlog ComponentBasedTest\" to terminal")]\r
+        [Step(1, "Click run TC")]\r
+        [Step(2, "Press 'Click me' button")]\r
+        [Step(3, "Check if log show \"ComponentBasedTest: OnStart\".")]\r
+        [Postcondition(1, "Close the terminal")]\r
+        public async Task OnStart_MANUAL_TEST()\r
+        {\r
+            CreateCompButton("Click me!!");\r
+            _comp_button.Clicked += OnClick;\r
+\r
+            /* TEST CODE */\r
+            await ManualTest.WaitForConfirm();\r
+            _comp_button.Clicked -= OnClick;\r
+        }\r
+\r
+        [Test]\r
+        [Category("P1")]\r
+        [Description("MANUAL TEST : OnStop() should be called when the application is terminated")]\r
+        [Property("SPEC", "Tizen.Applications.ComponentBased.Common.WidgetComponent.OnStop M")]\r
+        [Property("SPEC_URL", "-")]\r
+        [Property("CRITERIA", "MR")]\r
+        [Property("AUTHOR", "ChangGyu Choi, changyu.choi@samsung.com")]\r
+        [Precondition(1, "Kill WidgetViewerApp.Tizen(AppID: org.tizen.example.WidgetViewerApp.Tizen) if app is alive.")]\r
+        [Precondition(2, "Enter command \"sdb dlog -c\" to clear log")]\r
+        [Precondition(3, "Enter command \"sdb dlog ComponentBasedTest\" to terminal")]\r
+        [Step(1, "Click run TC")]\r
+        [Step(2, "Press 'Click me' button")]\r
+        [Step(3, "Terminate \"WidgetViewerApp.Tizen\" using task-mgr")]\r
+        [Step(4, "Check if log show \"ComponentBasedTest: OnStop\" after \"ComponentBasedTest: OnPause\".")]\r
+        [Postcondition(1, "Close the terminal")]\r
+        public async Task OnStop_MANUAL_TEST()\r
+        {\r
+            CreateCompButton("Click me!!");\r
+            _comp_button.Clicked += OnClick;\r
+\r
+            /* TEST CODE */\r
+            await ManualTest.WaitForConfirm();\r
+            _comp_button.Clicked -= OnClick;\r
+        }\r
+\r
+        [Test]\r
+        [Category("P1")]\r
+        [Description("MANUAL TEST : InitializeWindow() should be called after CreateWindowInfo function is called")]\r
+        [Property("SPEC", "Tizen.Applications.ComponentBased.Common.IWindowProxy.InitializeWindow M")]\r
+        [Property("SPEC_URL", "-")]\r
+        [Property("CRITERIA", "MR")]\r
+        [Property("AUTHOR", "ChangGyu Choi, changyu.choi@samsung.com")]\r
+        [Precondition(1, "Kill WidgetViewerApp.Tizen(AppID: org.tizen.example.WidgetViewerApp.Tizen) if app is alive.")]\r
+        [Precondition(2, "Enter command \"sdb dlog -c\" to clear log")]\r
+        [Precondition(3, "Enter command \"sdb dlog ComponentBasedTest\" to terminal")]\r
+        [Step(1, "Click run TC")]\r
+        [Step(2, "Press 'Click me' button")]\r
+        [Step(3, "Check if log show \"ComponentBasedTest: InitializeWindow\".")]\r
+        [Postcondition(1, "Close the terminal")]\r
+        public async Task InitializeWindow_MANUAL_TEST()\r
+        {\r
+            CreateCompButton("Click me!!");\r
+            _comp_button.Clicked += OnClick;\r
+\r
+            /* TEST CODE */\r
+            await ManualTest.WaitForConfirm();\r
+            _comp_button.Clicked -= OnClick;\r
+        }\r
+    }\r
+}\r
+\r
+\r
+\r
index 7854c92..071f453 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 2019 Samsung Electronics Co., Ltd All Rights Reserved
+ *  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.
old mode 100644 (file)
new mode 100755 (executable)
index 1d6f2c3..c5b1778
@@ -1,78 +1,43 @@
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26730.15
-MinimumVisualStudioVersion = 15.0.26124.0
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.ComponentBased.Tests", "Tizen.ComponentBased.Tests.csproj", "{D92BEEAC-3B2A-45F8-8C53-53B92550404A}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nunit.framework", "..\nunit.framework\nunit.framework.csproj", "{B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nunitlite", "..\nunitlite\nunitlite.csproj", "{FDB8025A-C029-461F-895E-287B4C65939B}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoTemplate", "..\Template\AutoTemplate\AutoTemplate.csproj", "{B11ABB0C-C3C1-4B5C-8251-A15628A775F3}"
-EndProject
-Global
-  GlobalSection(SolutionConfigurationPlatforms) = preSolution
-    Debug|Any CPU = Debug|Any CPU
-    Debug|x64 = Debug|x64
-    Debug|x86 = Debug|x86
-    Release|Any CPU = Release|Any CPU
-    Release|x64 = Release|x64
-    Release|x86 = Release|x86
-  EndGlobalSection
-  GlobalSection(ProjectConfigurationPlatforms) = postSolution
-    {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-    {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|Any CPU.Build.0 = Debug|Any CPU
-    {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|x64.ActiveCfg = Debug|Any CPU
-    {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|x64.Build.0 = Debug|Any CPU
-    {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|x86.ActiveCfg = Debug|Any CPU
-    {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|x86.Build.0 = Debug|Any CPU
-    {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|Any CPU.ActiveCfg = Release|Any CPU
-    {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|Any CPU.Build.0 = Release|Any CPU
-    {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|x64.ActiveCfg = Release|Any CPU
-    {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|x64.Build.0 = Release|Any CPU
-    {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|x86.ActiveCfg = Release|Any CPU
-    {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|x86.Build.0 = Release|Any CPU
-    {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-    {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|Any CPU.Build.0 = Debug|Any CPU
-    {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|x64.ActiveCfg = Debug|Any CPU
-    {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|x64.Build.0 = Debug|Any CPU
-    {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|x86.ActiveCfg = Debug|Any CPU
-    {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|x86.Build.0 = Debug|Any CPU
-    {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|Any CPU.ActiveCfg = Release|Any CPU
-    {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|Any CPU.Build.0 = Release|Any CPU
-    {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|x64.ActiveCfg = Release|Any CPU
-    {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|x64.Build.0 = Release|Any CPU
-    {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|x86.ActiveCfg = Release|Any CPU
-    {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|x86.Build.0 = Release|Any CPU
-    {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-    {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|Any CPU.Build.0 = Debug|Any CPU
-    {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|x64.ActiveCfg = Debug|Any CPU
-    {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|x64.Build.0 = Debug|Any CPU
-    {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|x86.ActiveCfg = Debug|Any CPU
-    {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|x86.Build.0 = Debug|Any CPU
-    {FDB8025A-C029-461F-895E-287B4C65939B}.Release|Any CPU.ActiveCfg = Release|Any CPU
-    {FDB8025A-C029-461F-895E-287B4C65939B}.Release|Any CPU.Build.0 = Release|Any CPU
-    {FDB8025A-C029-461F-895E-287B4C65939B}.Release|x64.ActiveCfg = Release|Any CPU
-    {FDB8025A-C029-461F-895E-287B4C65939B}.Release|x64.Build.0 = Release|Any CPU
-    {FDB8025A-C029-461F-895E-287B4C65939B}.Release|x86.ActiveCfg = Release|Any CPU
-    {FDB8025A-C029-461F-895E-287B4C65939B}.Release|x86.Build.0 = Release|Any CPU
-    {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-    {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Debug|Any CPU.Build.0 = Debug|Any CPU
-    {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Debug|x64.ActiveCfg = Debug|Any CPU
-    {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Debug|x64.Build.0 = Debug|Any CPU
-    {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Debug|x86.ActiveCfg = Debug|Any CPU
-    {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Debug|x86.Build.0 = Debug|Any CPU
-    {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Release|Any CPU.ActiveCfg = Release|Any CPU
-    {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Release|Any CPU.Build.0 = Release|Any CPU
-    {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Release|x64.ActiveCfg = Release|Any CPU
-    {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Release|x64.Build.0 = Release|Any CPU
-    {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Release|x86.ActiveCfg = Release|Any CPU
-    {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Release|x86.Build.0 = Release|Any CPU
-  EndGlobalSection
-  GlobalSection(SolutionProperties) = preSolution
-    HideSolutionNode = FALSE
-  EndGlobalSection
-  GlobalSection(ExtensibilityGlobals) = postSolution
-    SolutionGuid = {ED382B91-9930-40B6-B3D7-362304C78680}
-  EndGlobalSection
-EndGlobal
+Microsoft Visual Studio Solution File, Format Version 12.00\r
+# Visual Studio Version 16\r
+VisualStudioVersion = 16.0.31005.135\r
+MinimumVisualStudioVersion = 15.0.26124.0\r
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.ComponentBased.Tests", "Tizen.ComponentBased.Tests.csproj", "{D92BEEAC-3B2A-45F8-8C53-53B92550404A}"\r
+EndProject\r
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nunit.framework", "..\nunit.framework\nunit.framework.csproj", "{B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}"\r
+EndProject\r
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nunitlite", "..\nunitlite\nunitlite.csproj", "{FDB8025A-C029-461F-895E-287B4C65939B}"\r
+EndProject\r
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoTemplate", "..\Template\AutoTemplate\AutoTemplate.csproj", "{B11ABB0C-C3C1-4B5C-8251-A15628A775F3}"\r
+EndProject\r
+Global\r
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+               Debug|Any CPU = Debug|Any CPU\r
+               Release|Any CPU = Release|Any CPU\r
+       EndGlobalSection\r
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+               {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+               {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+               {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+               {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|Any CPU.Build.0 = Release|Any CPU\r
+               {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+               {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+               {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+               {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|Any CPU.Build.0 = Release|Any CPU\r
+               {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+               {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+               {FDB8025A-C029-461F-895E-287B4C65939B}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+               {FDB8025A-C029-461F-895E-287B4C65939B}.Release|Any CPU.Build.0 = Release|Any CPU\r
+               {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+               {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+               {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+               {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Release|Any CPU.Build.0 = Release|Any CPU\r
+       EndGlobalSection\r
+       GlobalSection(SolutionProperties) = preSolution\r
+               HideSolutionNode = FALSE\r
+       EndGlobalSection\r
+       GlobalSection(ExtensibilityGlobals) = postSolution\r
+                   SolutionGuid = {ED382B91-9930-40B6-B3D7-362304C78680}\r
+               SolutionGuid = {60023509-A7D2-4252-814F-ADBC51294239}\r
+       EndGlobalSection\r
+EndGlobal\r
old mode 100644 (file)
new mode 100755 (executable)
index 5e7756f..5015f86
-/*
- *  Copyright (c) 2019 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
- */
-
-using NUnit.Framework;
-using NUnit.Framework.TUnit;
-using System;
-using System.Collections.Generic;
-using System.Threading;
-using System.Threading.Tasks;
-using Tizen;
-using Tizen.Applications;
-using Tizen.Applications.ComponentBased.Common;
-
-namespace Tizen.ComponentBased.Tests {
-
-    public class FrameComp : FrameComponent
-    {
-        class TWindowInfo : IWindowInfo
-        {
-            public int ResourceId
-            {
-                get
-                {
-                    return 1;
-                }
+/*\r
+ *  Copyright (c) 2019 - 2021 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ *  Licensed under the Apache License, Version 2.0 (the "License");\r
+ *  you may not use this file except in compliance with the License.\r
+ *  You may obtain a copy of the License at\r
+ *\r
+ *      http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ *  Unless required by applicable law or agreed to in writing, software\r
+ *  distributed under the License is distributed on an "AS IS" BASIS,\r
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ *  See the License for the specific language governing permissions and\r
+ *  limitations under the License\r
+ */\r
+\r
+using NUnit.Framework;\r
+using NUnit.Framework.TUnit;\r
+using System;\r
+using System.Collections.Generic;\r
+using System.Threading;\r
+using System.Threading.Tasks;\r
+using Tizen;\r
+using Tizen.Applications;\r
+using Tizen.Applications.ComponentBased.Common;\r
+\r
+namespace Tizen.ComponentBased.Tests {\r
+\r
+    public class FrameComp : FrameComponent\r
+    {\r
+        class TWindowInfo : IWindowInfo\r
+        {\r
+            public int ResourceId\r
+            {\r
+                get\r
+                {\r
+                    return 1;\r
+                }\r
+            }\r
+\r
+            void IDisposable.Dispose()\r
+            {\r
+            }\r
+        }\r
+\r
+        public override IWindowInfo CreateWindowInfo()\r
+        {\r
+            return new TWindowInfo();\r
+        }\r
+\r
+        public override bool OnCreate()\r
+        {\r
+            return true;\r
+        }\r
+    }\r
+\r
+    public class ServiceComp : ServiceComponent\r
+    {\r
+        public override bool OnCreate()\r
+        {\r
+            return true;\r
+        }\r
+    }\r
+\r
+    public class TestApp : ComponentBasedApplication\r
+    {\r
+        public TestApp(IDictionary<Type, string> typeInfo) : base(typeInfo)\r
+        {\r
+        }\r
+        protected override void OnRun()\r
+        {\r
+\r
+        }\r
+    }\r
+\r
+    public class WidgetComp : WidgetComponent\r
+    {\r
+        class TWindowProxy : IWindowProxy\r
+        {\r
+            public int ResourceId\r
+            {\r
+                get\r
+                {\r
+                    return 1;\r
+                }\r
             }\r
 \r
             void IDisposable.Dispose()\r
             {\r
             }\r
-        }
-
-        public override IWindowInfo CreateWindowInfo()
-        {
-            return new TWindowInfo();
-        }
-
-        public override bool OnCreate()
-        {
-            return true;
-        }
-    }
-
-    public class ServiceComp : ServiceComponent
-    {
-        public override bool OnCreate()
-        {
-            return true;
-        }
-    }
-
-    public class TestApp : ComponentBasedApplication
-    {
-        public TestApp(IDictionary<Type, string> typeInfo) : base(typeInfo)
-        {
-        }
-        protected override void OnRun()
-        {
-
-        }
-    }
-
-    [TestFixture]
-    [Description("ComponentBasedApplication Class Tests")]
-    public class ComponentBasedTests {
-
-        [SetUp]
-        public void Init()
-        {
-            LogUtils.Write(LogUtils.DEBUG , LogUtils.TAG , "Preconditions for each TEST");
-        }
-
-        [TearDown]
-        public void Destroy()
-        {
-            LogUtils.Write(LogUtils.DEBUG , LogUtils.TAG , "Postconditions for each TEST");
-        }
-
-        [Test]
-        [Category("P1")]
-        [Description("Create a component-based application with a frame-component")]
-        [Property("SPEC", "Tizen.Applications.ComponentBased.Common.ComponentBasedApplication.ComponentBasedApplication C")]
-        [Property("SPEC_URL", "-")]
-        [Property("CRITERIA", "CONSTR")]
-        [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
-        [Property("COVPARAM", "Dictionary")]
-        public void ComponentBasedApplication_INIT()
-        {
-            IDictionary<Type, string> typeInfo = new Dictionary<Type, string>();
-            typeInfo.Add(typeof(FrameComp), "csharp_frame");
-            TestApp app = new TestApp(typeInfo);
-            Assert.NotNull(app, "Should not return NULL");
-            Assert.IsInstanceOf<ComponentBasedApplication>(app, "Should return ComponentBasedApplication.");
-        }
-
-        [Test]
-        [Category("P1")]
-        [Description("Test : Adds type to the component-based application should not throw exceptions")]
-        [Property("SPEC", "Tizen.Applications.ComponentBased.Common.ComponentBasedApplication.RegisterComponent M")]
-        [Property("SPEC_URL", "-")]
-        [Property("CRITERIA", "MR")]
-        [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
-        [Property("COVPARAM", "System.Type, string")]
-        public void RegisterComponent_Add_Value()
-        {
-            IDictionary<Type, string> typeInfo = new Dictionary<Type, string>();
-            typeInfo.Add(typeof(FrameComp), "csharp_frame");
-            TestApp app = new TestApp(typeInfo);
-            Assert.IsInstanceOf<ComponentBasedApplication>(app, "Should return ComponentBasedApplication.");
-
-            try
-            {
-                app.RegisterComponent(typeof(ServiceComp), "Service-comp");
-            }
-            catch (Exception e)
-            {
-                Assert.Fail(e.ToString());
-            }
-        }
-
-        [Test]
-        [Category("P2")]
-        [Description("Test : Adds already exist type to the component-based application should throw the Argument exception")]
-        [Property("SPEC", "Tizen.Applications.ComponentBased.Common.ComponentBasedApplication.RegisterComponent M")]
-        [Property("SPEC_URL", "-")]
-        [Property("CRITERIA", "MEX")]
-        [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
-        [Property("COVPARAM", "System.Type, string")]
-        public void RegisterComponent_ArgumentException()
-        {
-            IDictionary<Type, string> typeInfo = new Dictionary<Type, string>();
-            typeInfo.Add(typeof(FrameComp), "csharp_frame");
-            TestApp app = new TestApp(typeInfo);
-            Assert.IsInstanceOf<ComponentBasedApplication>(app, "Should return ComponentBasedApplication.");
-            Assert.Throws<ArgumentException>(() => app.RegisterComponent(typeof(FrameComp), "test"));
-        }
-    }
-}
+\r
+            public void InitializeWindow(int width, int height)\r
+            {\r
+            }\r
+        }\r
+\r
+        public override IWindowProxy CreateWindowInfo(int width, int height)\r
+        {\r
+            return new TWindowProxy();\r
+        }\r
+\r
+        public override bool OnCreate(int width, int height)\r
+        {\r
+            return true;\r
+        }\r
+    }\r
+\r
+    [TestFixture]\r
+    [Description("ComponentBasedApplication Class Tests")]\r
+    public class ComponentBasedTests {\r
+\r
+        [SetUp]\r
+        public void Init()\r
+        {\r
+            LogUtils.Write(LogUtils.DEBUG , LogUtils.TAG , "Preconditions for each TEST");\r
+        }\r
+\r
+        [TearDown]\r
+        public void Destroy()\r
+        {\r
+            LogUtils.Write(LogUtils.DEBUG , LogUtils.TAG , "Postconditions for each TEST");\r
+        }\r
+\r
+        [Test]\r
+        [Category("P1")]\r
+        [Description("Create a component-based application with a frame-component")]\r
+        [Property("SPEC", "Tizen.Applications.ComponentBased.Common.ComponentBasedApplication.ComponentBasedApplication C")]\r
+        [Property("SPEC_URL", "-")]\r
+        [Property("CRITERIA", "CONSTR")]\r
+        [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]\r
+        [Property("COVPARAM", "Dictionary")]\r
+        public void ComponentBasedApplication_INIT()\r
+        {\r
+            IDictionary<Type, string> typeInfo = new Dictionary<Type, string>();\r
+            typeInfo.Add(typeof(FrameComp), "csharp_frame");\r
+            TestApp app = new TestApp(typeInfo);\r
+            Assert.NotNull(app, "Should not return NULL");\r
+            Assert.IsInstanceOf<ComponentBasedApplication>(app, "Should return ComponentBasedApplication.");\r
+        }\r
+\r
+        [Test]\r
+        [Category("P1")]\r
+        [Description("Test : Adds type to the component-based application should not throw exceptions")]\r
+        [Property("SPEC", "Tizen.Applications.ComponentBased.Common.ComponentBasedApplication.RegisterComponent M")]\r
+        [Property("SPEC_URL", "-")]\r
+        [Property("CRITERIA", "MR")]\r
+        [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]\r
+        [Property("COVPARAM", "System.Type, string")]\r
+        public void RegisterComponent_Add_Value()\r
+        {\r
+            IDictionary<Type, string> typeInfo = new Dictionary<Type, string>();\r
+            typeInfo.Add(typeof(FrameComp), "csharp_frame");\r
+            TestApp app = new TestApp(typeInfo);\r
+            Assert.IsInstanceOf<ComponentBasedApplication>(app, "Should return ComponentBasedApplication.");\r
+\r
+            try\r
+            {\r
+                app.RegisterComponent(typeof(ServiceComp), "Service-comp");\r
+            }\r
+            catch (Exception e)\r
+            {\r
+                Assert.Fail(e.ToString());\r
+            }\r
+        }\r
+\r
+        [Test]\r
+        [Category("P2")]\r
+        [Description("Test : Adds already exist type to the component-based application should throw the Argument exception")]\r
+        [Property("SPEC", "Tizen.Applications.ComponentBased.Common.ComponentBasedApplication.RegisterComponent M")]\r
+        [Property("SPEC_URL", "-")]\r
+        [Property("CRITERIA", "MEX")]\r
+        [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]\r
+        [Property("COVPARAM", "System.Type, string")]\r
+        public void RegisterComponent_ArgumentException()\r
+        {\r
+            IDictionary<Type, string> typeInfo = new Dictionary<Type, string>();\r
+            typeInfo.Add(typeof(FrameComp), "csharp_frame");\r
+            TestApp app = new TestApp(typeInfo);\r
+            Assert.IsInstanceOf<ComponentBasedApplication>(app, "Should return ComponentBasedApplication.");\r
+            Assert.Throws<ArgumentException>(() => app.RegisterComponent(typeof(FrameComp), "test"));\r
+        }\r
+    }\r
+}\r
diff --git a/tct-suite-vs/Tizen.ComponentBased.Tests/testcase/TSWidgetComponent.cs b/tct-suite-vs/Tizen.ComponentBased.Tests/testcase/TSWidgetComponent.cs
new file mode 100755 (executable)
index 0000000..2694628
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ *  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
+ */
+
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using System;
+using System.Collections.Generic;
+using System.Threading;
+using System.Threading.Tasks;
+using Tizen;
+using Tizen.Applications;
+using Tizen.Applications.ComponentBased.Common;
+
+namespace Tizen.ComponentBased.Tests {
+
+    [TestFixture]
+    [Description("WidgetComponent Class Tests")]
+    public class WidgetComponentTests {
+
+        [SetUp]
+        public void Init()
+        {
+            LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Preconditions for each TEST");
+        }
+
+        [TearDown]
+        public void Destroy()
+        {
+            LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Postconditions for each TEST");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Create a widget component which will be used by component-based applications")]
+        [Property("SPEC", "Tizen.Applications.ComponentBased.Common.WidgetComponent.WidgetComponent C")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "CONSTR")]
+        [Property("AUTHOR", "ChangGyu Choi, changyu.choi@samsung.com")]
+        public void WidgetComponent_INIT()
+        {
+            var comp = new WidgetComp();
+            Assert.NotNull(comp, "Should not return NULL");
+            Assert.IsInstanceOf<WidgetComp>(comp, "Should return WidgetComp.");
+        }
+    }
+}
old mode 100644 (file)
new mode 100755 (executable)