--- /dev/null
+/*
+ * 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 System;
+using NUnit.Framework;
+using Xamarin.Forms;
+
+namespace XamarinApplication.Tizen
+{
+ class Program : global::Xamarin.Forms.Platform.Tizen.FormsApplication
+ {
+ private Application _app;
+ protected override void OnCreate()
+ {
+ Console.WriteLine("TCT : OnCreate()");
+ base.OnCreate();
+ if (ManualTest.IsWearable())
+ {
+ _app = new WearableTemplate.MainPage();
+ }
+ else
+ {
+ _app = new ManualTemplate.MainPage();
+ }
+ LoadApplication(_app);
+ }
+
+ static void Main(string[] args)
+ {
+ Console.WriteLine("TCT : Main()");
+ var app = new Program();
+ global::Xamarin.Forms.Platform.Tizen.Forms.Init(app);
+ app.Run(args);
+ }
+ }
+}
--- /dev/null
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <!-- Property Group for .NET Core Project -->
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>tizen60</TargetFramework>
+ </PropertyGroup>
+
+ <!-- Property Group for Tizen Project -->
+ <PropertyGroup>
+ <TizenCreateTpkOnBuild>true</TizenCreateTpkOnBuild>
+ </PropertyGroup>
+
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugType>portable</DebugType>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>None</DebugType>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <Folder Include="lib\" />
+ </ItemGroup>
+
+ <Import Project="..\Common\dependencies.props" />
+
+ <ItemGroup>
+ <PackageReference Include="Tizen.NET" Version="$(TizenNETVersion)">
+ <ExcludeAssets>Runtime</ExcludeAssets>
+ </PackageReference>
+ <PackageReference Include="Tizen.NET.Sdk" Version="$(TizenNETSdkVersion)" />
+ </ItemGroup>
+
+ <!-- Include Nuget Package for Tizen Project building -->
+ <ItemGroup>
+ <ProjectReference Include="..\Template\ManualTemplate\ManualTemplate.csproj" />
+ </ItemGroup>
+ <ItemGroup>
+ <Reference Include="Tizen.Applications.ComponentBased">
+ <HintPath>..\..\..\TizenFX\src\Tizen.Applications.ComponentBased.Default\bin\Debug\netstandard2.0\Tizen.Applications.ComponentBased.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+
+</Project>
--- /dev/null
+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
--- /dev/null
+/*
+ * 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 System;
+using System.Threading.Tasks;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.Applications;
+using Xamarin.Forms;
+
+namespace Tizen.ComponentBasedApplication.Tests
+{
+ [TestFixture]
+ [Description("Tizen.Applications.ComponentBasedApplication base component test")]
+ public class BaseComponentTests
+ {
+ private TestPage _testPage = TestPage.GetInstance();
+ private Button _comp_button;
+ private string _testAppId = "org.tizen.example.ComponentBasedTest";
+ private bool _isMobile = false;
+ private bool _isWearable = false;
+ private bool _isEmulator = false;
+
+ [SetUp]
+ public void Init()
+ {
+ LogUtils.Write(LogUtils.INFO, LogUtils.TAG, "Preconditions for each TEST");
+ _isMobile = ManualTest.IsMobile();
+ _isWearable = ManualTest.IsWearable();
+ _isEmulator = ManualTest.IsEmulator();
+ _comp_button = new Button();
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ LogUtils.Write(LogUtils.INFO, LogUtils.TAG, "Postconditions for each TEST");
+ _comp_button = null;
+ }
+
+ private void CreateCompButton(string btnText)
+ {
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "CreateButton");
+ var layout = new StackLayout()
+ {
+ IsVisible = true,
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ };
+
+ _comp_button = new Button()
+ {
+ Text = btnText,
+ FontSize = 20,
+ VerticalOptions = LayoutOptions.Center,
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ };
+
+ layout.Children.Add(_comp_button);
+ _testPage.ExecuteTC(layout);
+ }
+
+ private void OnClick(object sender, EventArgs e)
+ {
+ AppControl control = new AppControl();
+ control.ApplicationId = _testAppId;
+ control.Operation = AppControlOperations.Default;
+ AppControl.SendLaunchRequest(control);
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("MANUAL TEST : OnDestroy() should be called after Finish method call")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.Common.BaseComponent.Finish M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
+ [Precondition(1, "Enter command \"sdb dlog -c\" to clear log")]
+ [Precondition(2, "Enter command \"sdb dlog ComponentBasedTest\" to terminal")]
+ [Step(1, "Click run TC")]
+ [Step(2, "Press 'Click me' button")]
+ [Step(3, "Press launched application's 'Finish' button")]
+ [Step(4, "Check if log show \"ComponentBasedTest: OnDestroy\".")]
+ [Postcondition(1, "Close the terminal")]
+ public async Task Finish_MANUAL_TEST()
+ {
+ CreateCompButton("Click me!! Test: Launch ComponentBased Application");
+ _comp_button.Clicked += OnClick;
+
+ /* TEST CODE */
+ await ManualTest.WaitForConfirm();
+ _comp_button.Clicked -= OnClick;
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("MANUAL TEST : OnRestoreContents() should be called after OnCreate() function is called")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.Common.BaseComponent.OnRestoreContents M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
+ [Precondition(1, "Enter command \"sdb dlog -c\" to clear log")]
+ [Precondition(2, "Enter command \"sdb dlog ComponentBasedTest\" to terminal")]
+ [Step(1, "Click run TC")]
+ [Step(2, "Press 'Click me' button")]
+ [Step(3, "Check if log show \"ComponentBasedTest: OnRestoreContents\" after \"ComponentBasedTest: OnCreate\".")]
+ [Postcondition(1, "Close the terminal")]
+ [Postcondition(2, "Press launched application's 'Exit' button")]
+ public async Task OnRestoreContents_MANUAL_TEST()
+ {
+ CreateCompButton("Click me!! Test: Launch ComponentBased Application");
+ _comp_button.Clicked += OnClick;
+
+ /* TEST CODE */
+ await ManualTest.WaitForConfirm();
+ _comp_button.Clicked -= OnClick;
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("MANUAL TEST : OnSaveContent() should be called before OnDestroy function is called")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.Common.BaseComponent.OnSaveContent M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
+ [Precondition(1, "Enter command \"sdb dlog -c\" to clear log")]
+ [Precondition(2, "Enter command \"sdb dlog ComponentBasedTest\" to terminal")]
+ [Step(1, "Click run TC")]
+ [Step(2, "Press 'Click me' button")]
+ [Step(3, "Press launched application's 'Exit' button")]
+ [Step(4, "Check if log show \"ComponentBasedTest: OnSaveContent\" before \"ComponentBasedTest: OnDestroy\".")]
+ [Postcondition(1, "Close the terminal")]
+ public async Task OnSaveContent_MANUAL_TEST()
+ {
+ CreateCompButton("Click me!! Test: Launch ComponentBased Application");
+ _comp_button.Clicked += OnClick;
+
+ /* TEST CODE */
+ await ManualTest.WaitForConfirm();
+ _comp_button.Clicked -= OnClick;
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("MANUAL TEST : Launch application using group mode")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.Common.BaseComponent.SendLaunchRequestAsync M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
+ [Step(1, "Click run TC")]
+ [Step(2, "Press 'Click me' button")]
+ [Step(3, "Press launched application's 'Group Launch' button")]
+ [Step(4, "Check wether New UI application is launched or not")]
+ [Postcondition(1, "Close the terminal")]
+ [Postcondition(2, "Press launched application's 'Exit' button")]
+ public async Task SendLaunchRequestAsync_MANUAL_TEST()
+ {
+ CreateCompButton("Click me!! Test: Launch ComponentBased Application");
+ _comp_button.Clicked += OnClick;
+
+ /* TEST CODE */
+ await ManualTest.WaitForConfirm();
+ _comp_button.Clicked -= OnClick;
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test : Gets ComponentId of the running component")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.Common.BaseComponent.ComponentId A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
+ [Precondition(1, "Enter command \"sdb dlog -c\" to clear log")]
+ [Precondition(2, "Enter command \"sdb dlog ComponentBasedTest\" to terminal")]
+ [Step(1, "Click run TC")]
+ [Step(2, "Press 'Click me' button")]
+ [Step(3, "Check if log show \"ComponentBasedTest: ComponentId(test_csharp_frame)\"")]
+ [Postcondition(1, "Close the terminal")]
+ [Postcondition(2, "Press launched application's 'Exit' button")]
+ public async Task ComponentId_MANUAL_TEST()
+ {
+ CreateCompButton("Click me!! Test: Launch ComponentBased Application");
+ _comp_button.Clicked += OnClick;
+
+ /* TEST CODE */
+ await ManualTest.WaitForConfirm();
+ _comp_button.Clicked -= OnClick;
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test : Gets the Id of the running component")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.Common.BaseComponent.Id A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
+ [Precondition(1, "Enter command \"sdb dlog -c\" to clear log")]
+ [Precondition(2, "Enter command \"sdb dlog ComponentBasedTest\" to terminal")]
+ [Step(1, "Click run TC")]
+ [Step(2, "Press 'Click me' button")]
+ [Step(3, "Check if log show \"ComponentBasedTest: id(random string)\". The Id will be generated randomly")]
+ [Postcondition(1, "Close the terminal")]
+ [Postcondition(2, "Press launched application's 'Exit' button")]
+ public async Task Id_MANUAL_TEST()
+ {
+ CreateCompButton("Click me!! Test: Launch ComponentBased Application");
+ _comp_button.Clicked += OnClick;
+
+ /* TEST CODE */
+ await ManualTest.WaitForConfirm();
+ _comp_button.Clicked -= OnClick;
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test : Gets the running component's parent application information")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.Common.BaseComponent.Parent A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
+ [Precondition(1, "Enter command \"sdb dlog -c\" to clear log")]
+ [Precondition(2, "Enter command \"sdb dlog ComponentBasedTest\" to terminal")]
+ [Step(1, "Click run TC")]
+ [Step(2, "Press 'Click me' button")]
+ [Step(3, "Check if log show \"ComponentBasedTest: Parent(org.tizen.example.ComponentBasedTest)\".")]
+ [Postcondition(1, "Close the terminal")]
+ [Postcondition(2, "Press launched application's 'Exit' button")]
+ public async Task Parent_MANUAL_TEST()
+ {
+ CreateCompButton("Click me!! Test: Launch ComponentBased Application");
+ _comp_button.Clicked += OnClick;
+
+ /* TEST CODE */
+ await ManualTest.WaitForConfirm();
+ _comp_button.Clicked -= OnClick;
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("MANUAL TEST : The LowMemory event should be caught when a device memory is low")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.Common.BaseComponent.LowMemory E")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "EVL")]
+ [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
+ [Precondition(1, "This test can be tested only in mobile emulator now.")]
+ [Precondition(2, "Open terminal to view logs.")]
+ [Precondition(3, "Enter command \"sdb dlog -c\" to clear log")]
+ [Precondition(4, "Enter command \"sdb dlog | grep ComponentBasedTest\" to terminal")]
+ [Precondition(5, "Right click on the mobile emulator and Click ControlPanel")]
+ [Step(1, "Click run TC")]
+ [Step(2, "Press 'Click me' button")]
+ [Step(3, "Find and click Memory button in Emulator Control Panel")]
+ [Step(4, "Select Soft Warning button")]
+ [Step(5, "Check if log show \"FrameComp_LowMemory > Low Memory Frame: SoftWarning\".")]
+ [Step(6, "Select Hard Warning button")]
+ [Step(7, "Check if log show \"FrameComp_LowMemory > Low Memory Frame: HardWarning\".")]
+ [Postcondition(1, "Close the terminal")]
+ [Postcondition(2, "Press launched application's 'Exit' button")]
+ public async Task LowMemory_MANUAL_TEST()
+ {
+ if (!_isMobile || !_isEmulator)
+ {
+ ManualTest.Confirm();
+ return;
+ }
+ else
+ {
+ CreateCompButton("Click me!! Test: Launch ComponentBased Application");
+ _comp_button.Clicked += OnClick;
+
+ /* TEST CODE */
+ await ManualTest.WaitForConfirm();
+ _comp_button.Clicked -= OnClick;
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("MANUAL TEST : The LowBattery event should be caught when a device battery status is low")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.Common.BaseComponent.LowBattery E")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "EVL")]
+ [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
+ [Precondition(1, "This test can be tested only in mobile emulator now.")]
+ [Precondition(2, "Open terminal to view logs.")]
+ [Precondition(3, "Enter command \"sdb dlog -c\" to clear log")]
+ [Precondition(4, "Enter command \"sdb dlog | grep ComponentBasedTest\" to terminal")]
+ [Precondition(5, "Right click on the mobile emulator and Click ControlPanel")]
+ [Step(1, "Click run TC")]
+ [Step(2, "Press 'Click me' button")]
+ [Step(3, "Find and click Battery button in Emulator Control Panel")]
+ [Step(4, "Click level bar to make it under 5%")]
+ [Step(5, "Check if log show \"FrameComp_LowBattery > Low Battery\".")]
+ [Postcondition(1, "Close the terminal")]
+ [Postcondition(2, "Press launched application's 'Exit' button")]
+ public async Task LowBattery_MANUAL_TEST()
+ {
+ if (!_isMobile || !_isEmulator)
+ {
+ ManualTest.Confirm();
+ return;
+ }
+ else
+ {
+ CreateCompButton("Click me!! Test: Launch ComponentBased Application");
+ _comp_button.Clicked += OnClick;
+
+ /* TEST CODE */
+ await ManualTest.WaitForConfirm();
+ _comp_button.Clicked -= OnClick;
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("MANUAL TEST : The DeviceOrientationChanged event should be caught when a device orientation is changed")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.Common.BaseComponent.DeviceOrientationChanged E")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "EVL")]
+ [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
+ [Precondition(1, "This test can be tested only in devices which provide auto rotate option. (For now only mobile provide this option)")]
+ [Precondition(2, "Open terminal to view logs.")]
+ [Precondition(3, "Enter command \"sdb dlog -c\" to clear log")]
+ [Precondition(4, "Enter command \"sdb dlog | grep ComponentBasedTest\" to terminal")]
+ [Precondition(5, "(emulator only) Right click on the mobile emulator and Click ControlPanel")]
+ [Step(1, "Click run TC")]
+ [Step(2, "Press 'Click me' button")]
+ [Step(3, "Rotate the device or find 3-Axis in Emulator Control Panel and change device orientation")]
+ [Step(4, "Check if log show \"FrameComp_DeviceOrientationChanged > Device Orientation Changed\".")]
+ [Postcondition(1, "Close the terminal")]
+ [Postcondition(2, "Press launched application's 'Exit' button")]
+ public async Task DeviceOrientationChanged_MANUAL_TEST()
+ {
+ if (!_isMobile || !_isEmulator)
+ {
+ ManualTest.Confirm();
+ return;
+ }
+ else
+ {
+ CreateCompButton("Click me!! Test: Launch ComponentBased Application");
+ _comp_button.Clicked += OnClick;
+
+ /* TEST CODE */
+ await ManualTest.WaitForConfirm();
+ _comp_button.Clicked -= OnClick;
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("MANUAL TEST : The LocaleChanged Event should be caught after change Language of device")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.Common.BaseComponent.LocaleChanged E")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "EVL")]
+ [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
+ [Precondition(1, "Open terminal to view logs.")]
+ [Precondition(2, "Enter command \"sdb dlog -c\" to clear log")]
+ [Precondition(3, "Enter command \"sdb dlog | grep ComponentBasedTest\" to terminal")]
+ [Step(1, "Click run TC")]
+ [Step(2, "Press 'Click me' button")]
+ [Step(3, "[Common] if you cannot change a language in a setting app, this test can not be tested. Please click \"Pass\" button.")]
+ [Step(4, "Press Home hardkey -> Setting app -> change language -> return to app test")]
+ [Step(5, "Check if log show \"FrameComp_LocaleChanged > Locale Changed\".")]
+ [Postcondition(1, "Close the terminal")]
+ [Postcondition(2, "Press launched application's 'Exit' button")]
+ public async Task LocaleChanged_EVENT_TEST()
+ {
+ CreateCompButton("Click me!! Test: Launch ComponentBased Application");
+ _comp_button.Clicked += OnClick;
+
+ /* TEST CODE */
+ await ManualTest.WaitForConfirm();
+ _comp_button.Clicked -= OnClick;
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("MANUAL TEST : The RegionFormatChanged Event should be caught after change Language of device")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.Common.BaseComponent.RegionFormatChanged E")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "EVL")]
+ [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
+ [Precondition(1, "Open terminal to view logs.")]
+ [Precondition(2, "Enter command \"sdb dlog -c\" to clear log")]
+ [Precondition(3, "Enter command \"sdb dlog | grep TestCase\" to terminal")]
+ [Step(1, "Click run TC")]
+ [Step(2, "Press 'Click me' button")]
+ [Step(3, "[mobile] Press Home hardkey -> Setting app -> change language -> return to app test")]
+ [Step(4, "[TV profile] Press Home key -> Settings -> System -> Location -> change location -> return to app test")]
+ [Step(5, "[TV profile] if there is no \"Location\" menu, this test can not be tested. Please click \"Pass\" button if \"Location\" menu doesn't exist.")]
+ [Step(6, "[Wearable profile] if there is no \"Location\" menu, this test can not be tested. Please click \"Pass\" button if the \"Location\" menu doesn't exist.")]
+ [Step(7, "Check if log show \"FrameComp_RegionFormatChanged > Region Format Changed\".")]
+ [Postcondition(1, "Close the terminal")]
+ [Postcondition(2, "Press launched application's 'Exit' button")]
+ public async Task RegionFormatChanged_EVENT_TEST()
+ {
+ CreateCompButton("Click me!! Test: Launch ComponentBased Application");
+ _comp_button.Clicked += OnClick;
+
+ /* TEST CODE */
+ await ManualTest.WaitForConfirm();
+ _comp_button.Clicked -= OnClick;
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("MANUAL TEST : The SuspendedStateChanged Event should be caught after application is suspended")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.Common.BaseComponent.SuspendedStateChanged E")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "EVL")]
+ [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
+ [Precondition(1, "Open terminal to view logs.")]
+ [Precondition(2, "Enter command \"sdb dlog -c\" to clear log")]
+ [Precondition(3, "Enter command \"sdb dlog | grep ComponentBasedTest\" to terminal")]
+ [Step(1, "Click run TC")]
+ [Step(2, "Press 'Click me' button")]
+ [Step(3, "Press Home hardkey")]
+ [Step(4, "Check if log show \"FrameComp_SuspendedStateChanged > SuspendedState Changed\".")]
+ [Postcondition(1, "Close the terminal")]
+ [Postcondition(2, "Press launched application's 'Exit' button")]
+ public async Task SuspendedStateChanged_EVENT_TEST()
+ {
+ CreateCompButton("Click me!! Test: Launch ComponentBased Application");
+ _comp_button.Clicked += OnClick;
+
+ /* TEST CODE */
+ await ManualTest.WaitForConfirm();
+ _comp_button.Clicked -= OnClick;
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Test : SendLaunchRequest with not installed application ID should throw the app not found exception")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.Common.BaseComponent.SendLaunchRequestAsync M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
+ [Precondition(1, "Open terminal to view logs.")]
+ [Precondition(2, "Enter command \"sdb dlog -c\" to clear log")]
+ [Precondition(3, "Enter command \"sdb dlog | grep ComponentBasedTest\" to terminal")]
+ [Step(1, "Click run TC")]
+ [Step(2, "Press 'Click me' button")]
+ [Step(3, "Press launched application's 'Launch Not Exist App' button")]
+ [Step(4, "Check if log show \"OnLaunchNotExistClick > Async result : AppNotFound\".")]
+ [Postcondition(1, "Close the terminal")]
+ [Postcondition(2, "Press launched application's 'Exit' button")]
+ public async Task SendLaunchRequestAsync_AppNotFoundException()
+ {
+ CreateCompButton("Click me!! Test: Launch ComponentBased Application");
+ _comp_button.Clicked += OnClick;
+
+ /* TEST CODE */
+ await ManualTest.WaitForConfirm();
+ _comp_button.Clicked -= OnClick;
+ }
+ }
+}
+
+
+
--- /dev/null
+/*
+ * 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 System;
+using System.Threading.Tasks;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.Applications;
+using Xamarin.Forms;
+
+namespace Tizen.ComponentBasedApplication.Tests
+{
+ [TestFixture]
+ [Description("Tizen.Applications.ComponentBasedApplication test")]
+ public class ComponentBasedApplicationTests
+ {
+ private TestPage _testPage = TestPage.GetInstance();
+ private Button _comp_button;
+ private string _testAppId = "org.tizen.example.ComponentBasedTest";
+
+ [SetUp]
+ public void Init()
+ {
+ LogUtils.Write(LogUtils.INFO, LogUtils.TAG, "Preconditions for each TEST");
+ _comp_button = new Button();
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ LogUtils.Write(LogUtils.INFO, LogUtils.TAG, "Postconditions for each TEST");
+ _comp_button = null;
+ }
+
+ private void CreateCompButton(string btnText)
+ {
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "CreateButton");
+ var layout = new StackLayout()
+ {
+ IsVisible = true,
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ };
+
+ _comp_button = new Button()
+ {
+ Text = btnText,
+ FontSize = 20,
+ VerticalOptions = LayoutOptions.Center,
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ };
+
+ layout.Children.Add(_comp_button);
+ _testPage.ExecuteTC(layout);
+ }
+
+ private void OnClick(object sender, EventArgs e)
+ {
+ AppControl control = new AppControl();
+ control.ApplicationId = _testAppId;
+ control.Operation = AppControlOperations.Default;
+ AppControl.SendLaunchRequest(control);
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("MANUAL TEST : Run() method call should start component-based application lifecycle")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.Common.ComponentBasedApplication.Run M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
+ [Precondition(1, "Enter command \"sdb dlog -c\" to clear log")]
+ [Precondition(2, "Enter command \"sdb dlog ComponentBasedTest\" to terminal")]
+ [Step(1, "Click run TC")]
+ [Step(2, "Press 'Click me' button")]
+ [Step(3, "Check if log show \"ComponentBasedTest: OnRun\".")]
+ [Step(4, "Check component-based application is displayed.")]
+ [Postcondition(1, "Close the terminal")]
+ [Postcondition(2, "Press launched application's 'Exit' button")]
+ public async Task Run_MANUAL_TEST()
+ {
+ CreateCompButton("Click me!! Test: Launch ComponentBased Application");
+ _comp_button.Clicked += OnClick;
+
+ /* TEST CODE */
+ await ManualTest.WaitForConfirm();
+ _comp_button.Clicked -= OnClick;
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("MANUAL TEST : OnInit() should be called after launch component-based application")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.Common.ComponentBasedApplication.OnInit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
+ [Precondition(1, "Enter command \"sdb dlog -c\" to clear log")]
+ [Precondition(2, "Enter command \"sdb dlog ComponentBasedTest\" to terminal")]
+ [Step(1, "Click run TC")]
+ [Step(2, "Press 'Click me' button")]
+ [Step(3, "Check if log show \"ComponentBasedTest: OnInit\".")]
+ [Postcondition(1, "Close the terminal")]
+ [Postcondition(2, "Press launched application's 'Exit' button")]
+ public async Task OnInit_MANUAL_TEST()
+ {
+ //await TermiatePreviousApp();
+ CreateCompButton("Click me!! Test: Launch ComponentBased Application");
+ _comp_button.Clicked += OnClick;
+
+ /* TEST CODE */
+ await ManualTest.WaitForConfirm();
+ _comp_button.Clicked -= OnClick;
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("MANUAL TEST : OnRun() should be called after component-based application is launched")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.Common.ComponentBasedApplication.OnRun M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
+ [Precondition(1, "Enter command \"sdb dlog -c\" to clear log")]
+ [Precondition(2, "Enter command \"sdb dlog ComponentBasedTest\" to terminal")]
+ [Step(1, "Click run TC")]
+ [Step(2, "Press 'Click me' button")]
+ [Step(3, "Check if log show \"ComponentBasedTest: OnRun\".")]
+ [Postcondition(1, "Close the terminal")]
+ [Postcondition(2, "Press launched application's 'Exit' button")]
+ public async Task OnRun_MANUAL_TEST()
+ {
+ //await TermiatePreviousApp();
+ CreateCompButton("Click me!! Test: Launch ComponentBased Application");
+ _comp_button.Clicked += OnClick;
+
+ /* TEST CODE */
+ await ManualTest.WaitForConfirm();
+ _comp_button.Clicked -= OnClick;
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("MANUAL TEST : OnExit() should be called after component-based application is terminated")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.Common.ComponentBasedApplication.OnExit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
+ [Precondition(1, "Enter command \"sdb dlog -c\" to clear log")]
+ [Precondition(2, "Enter command \"sdb dlog ComponentBasedTest\" to terminal")]
+ [Step(1, "Click run TC")]
+ [Step(2, "Press 'Click me' button")]
+ [Step(3, "Press launched application's 'Exit' button")]
+ [Step(4, "Check if log show \"ComponentBasedTest: OnExit\".")]
+ [Postcondition(1, "Close the terminal")]
+ public async Task OnExit_MANUAL_TEST()
+ {
+ //await TermiatePreviousApp();
+ CreateCompButton("Click me!! Test: Launch ComponentBased Application");
+ _comp_button.Clicked += OnClick;
+
+ /* TEST CODE */
+ await ManualTest.WaitForConfirm();
+ _comp_button.Clicked -= OnClick;
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("MANUAL TEST : OnFinished() should be called after OnExit")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.Common.ComponentBasedApplication.OnFinished M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
+ [Precondition(1, "Enter command \"sdb dlog -c\" to clear log")]
+ [Precondition(2, "Enter command \"sdb dlog ComponentBasedTest\" to terminal")]
+ [Step(1, "Click run TC")]
+ [Step(2, "Press 'Click me' button")]
+ [Step(3, "Press launched application's 'Exit' button")]
+ [Step(4, "Check if log show \"ComponentBasedTest: OnFinished\".")]
+ [Postcondition(1, "Close the terminal")]
+ public async Task OnFinished_MANUAL_TEST()
+ {
+ CreateCompButton("Click me!! Test: Launch ComponentBased Application");
+ _comp_button.Clicked += OnClick;
+
+ /* TEST CODE */
+ await ManualTest.WaitForConfirm();
+ _comp_button.Clicked -= OnClick;
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("MANUAL TEST : The component-based application should be dead after the Exit method is called")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.Common.ComponentBasedApplication.Exit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
+ [Precondition(1, "Enter command \"sdb dlog -c\" to clear log")]
+ [Precondition(2, "Enter command \"sdb dlog ComponentBasedTest\" to terminal")]
+ [Step(1, "Click run TC")]
+ [Step(2, "Press 'Click me' button")]
+ [Step(3, "Press launched application's 'Exit' button")]
+ [Step(4, "Check if log show \"ComponentBasedTest: OnFinished\".")]
+ [Postcondition(1, "Close the terminal")]
+ public async Task Exit_MANUAL_TEST()
+ {
+ CreateCompButton("Click me!! Test: Check whether ComponentBased Application is successfully terminated or not");
+ _comp_button.Clicked += OnClick;
+
+ /* TEST CODE */
+ await ManualTest.WaitForConfirm();
+ _comp_button.Clicked -= OnClick;
+ }
+ }
+}
--- /dev/null
+/*
+ * 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 System;
+using System.Threading.Tasks;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.Applications;
+using Xamarin.Forms;
+
+namespace Tizen.ComponentBasedApplication.Tests
+{
+ [TestFixture]
+ [Description("Tizen.Applications.ComponentBasedApplication frame component test")]
+ public class FrameComponentTests
+ {
+ private TestPage _testPage = TestPage.GetInstance();
+ private Button _comp_button;
+ private string _testAppId = "org.tizen.example.ComponentBasedTest";
+ private bool _isMobile = false;
+ private bool _isWearable = false;
+ private bool _isEmulator = false;
+
+ [SetUp]
+ public void Init()
+ {
+ LogUtils.Write(LogUtils.INFO, LogUtils.TAG, "Preconditions for each TEST");
+ _isMobile = ManualTest.IsMobile();
+ _isWearable = ManualTest.IsWearable();
+ _isEmulator = ManualTest.IsEmulator();
+ _comp_button = new Button();
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ LogUtils.Write(LogUtils.INFO, LogUtils.TAG, "Postconditions for each TEST");
+ _comp_button = null;
+ }
+
+ private void CreateCompButton(string btnText)
+ {
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "CreateButton");
+ var layout = new StackLayout()
+ {
+ IsVisible = true,
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ };
+
+ _comp_button = new Button()
+ {
+ Text = btnText,
+ FontSize = 20,
+ VerticalOptions = LayoutOptions.Center,
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ };
+
+ layout.Children.Add(_comp_button);
+ _testPage.ExecuteTC(layout);
+ }
+
+ private void OnClick(object sender, EventArgs e)
+ {
+ AppControl control = new AppControl();
+ control.ApplicationId = _testAppId;
+ control.Operation = AppControlOperations.Default;
+ AppControl.SendLaunchRequest(control);
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("MANUAL TEST : CreateWindowInfo() should be called before OnCreate function is called")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.Common.FrameComponent.CreateWindowInfo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
+ [Precondition(1, "Enter command \"sdb dlog -c\" to clear log")]
+ [Precondition(2, "Enter command \"sdb dlog ComponentBasedTest\" to terminal")]
+ [Step(1, "Click run TC")]
+ [Step(2, "Press 'Click me' button")]
+ [Step(3, "Check if log show \"ComponentBasedTest: CreateWindowInfo success\" before \"ComponentBasedTest: OnCreate\".")]
+ [Postcondition(1, "Close the terminal")]
+ [Postcondition(2, "Press launched application's 'Exit' button")]
+ public async Task CreateWindowInfo_MANUAL_TEST()
+ {
+ CreateCompButton("Click me!! Test: Launch ComponentBased Application");
+ _comp_button.Clicked += OnClick;
+
+ /* TEST CODE */
+ await ManualTest.WaitForConfirm();
+ _comp_button.Clicked -= OnClick;
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("MANUAL TEST : OnCreate() should be called after CreateWindowInfo function is called")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.Common.FrameComponent.OnCreate M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
+ [Precondition(1, "Enter command \"sdb dlog -c\" to clear log")]
+ [Precondition(2, "Enter command \"sdb dlog ComponentBasedTest\" to terminal")]
+ [Step(1, "Click run TC")]
+ [Step(2, "Press 'Click me' button")]
+ [Step(3, "Check if log show \"ComponentBasedTest: OnCreate\" after \"ComponentBasedTest: CreateWindowInfo success\".")]
+ [Postcondition(1, "Close the terminal")]
+ [Postcondition(2, "Press launched application's 'Exit' button")]
+ public async Task OnCreate_MANUAL_TEST()
+ {
+ CreateCompButton("Click me!! Test: Launch ComponentBased Application");
+ _comp_button.Clicked += OnClick;
+
+ /* TEST CODE */
+ await ManualTest.WaitForConfirm();
+ _comp_button.Clicked -= OnClick;
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("MANUAL TEST : OnDestroy() should be called after Finish function is called")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.Common.FrameComponent.OnDestroy M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
+ [Precondition(1, "Enter command \"sdb dlog -c\" to clear log")]
+ [Precondition(2, "Enter command \"sdb dlog ComponentBasedTest\" to terminal")]
+ [Step(1, "Click run TC")]
+ [Step(2, "Press 'Click me' button")]
+ [Step(3, "Press launched application's 'Finish' button")]
+ [Step(4, "Check if log show \"ComponentBasedTest: OnDestroy\".")]
+ [Postcondition(1, "Close the terminal")]
+ [Postcondition(2, "Press launched application's 'Exit' button")]
+ public async Task OnDestroy_MANUAL_TEST()
+ {
+ CreateCompButton("Click me!! Test: Launch ComponentBased Application");
+ _comp_button.Clicked += OnClick;
+
+ /* TEST CODE */
+ await ManualTest.WaitForConfirm();
+ _comp_button.Clicked -= OnClick;
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("MANUAL TEST : OnPause() should be called when the application is not visible")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.Common.FrameComponent.OnPause M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
+ [Precondition(1, "Enter command \"sdb dlog -c\" to clear log")]
+ [Precondition(2, "Enter command \"sdb dlog ComponentBasedTest\" to terminal")]
+ [Step(1, "Click run TC")]
+ [Step(2, "Press 'Click me' button")]
+ [Step(3, "Press Home button")]
+ [Step(4, "Check if log show \"ComponentBasedTest: OnPause\".")]
+ [Postcondition(1, "Close the terminal")]
+ [Postcondition(2, "Press launched application's 'Exit' button")]
+ public async Task OnPause_MANUAL_TEST()
+ {
+ CreateCompButton("Click me!! Test: Launch ComponentBased Application");
+ _comp_button.Clicked += OnClick;
+
+ /* TEST CODE */
+ await ManualTest.WaitForConfirm();
+ _comp_button.Clicked -= OnClick;
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("MANUAL TEST : OnResume() should be called after launch")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.Common.FrameComponent.OnResume M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
+ [Precondition(1, "Enter command \"sdb dlog -c\" to clear log")]
+ [Precondition(2, "Enter command \"sdb dlog ComponentBasedTest\" to terminal")]
+ [Precondition(3, "The device LCD should be on")]
+ [Step(1, "Click run TC")]
+ [Step(2, "Press 'Click me' button")]
+ [Step(3, "Check if log show \"ComponentBasedTest: OnResume\".")]
+ [Postcondition(1, "Close the terminal")]
+ [Postcondition(2, "Press launched application's 'Exit' button")]
+ public async Task OnResume_MANUAL_TEST()
+ {
+ CreateCompButton("Click me!! Test: Launch ComponentBased Application");
+ _comp_button.Clicked += OnClick;
+
+ /* TEST CODE */
+ await ManualTest.WaitForConfirm();
+ _comp_button.Clicked -= OnClick;
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("MANUAL TEST : OnStart() should be called after launch")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.Common.FrameComponent.OnStart M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
+ [Precondition(1, "Enter command \"sdb dlog -c\" to clear log")]
+ [Precondition(2, "Enter command \"sdb dlog ComponentBasedTest\" to terminal")]
+ [Step(1, "Click run TC")]
+ [Step(2, "Press 'Click me' button")]
+ [Step(3, "Check if log show \"ComponentBasedTest: OnStart\".")]
+ [Postcondition(1, "Close the terminal")]
+ [Postcondition(2, "Press launched application's 'Exit' button")]
+ public async Task OnStart_MANUAL_TEST()
+ {
+ CreateCompButton("Click me!! Test: Launch ComponentBased Application");
+ _comp_button.Clicked += OnClick;
+
+ /* TEST CODE */
+ await ManualTest.WaitForConfirm();
+ _comp_button.Clicked -= OnClick;
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("MANUAL TEST : OnStop() should be called when the application is terminated")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.Common.FrameComponent.OnStop M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
+ [Precondition(1, "Enter command \"sdb dlog -c\" to clear log")]
+ [Precondition(2, "Enter command \"sdb dlog ComponentBasedTest\" to terminal")]
+ [Step(1, "Click run TC")]
+ [Step(2, "Press 'Click me' button")]
+ [Step(3, "Press launched application's 'Exit' button")]
+ [Step(4, "Check if log show \"ComponentBasedTest: OnStop\" after \"ComponentBasedTest: OnPause\".")]
+ [Postcondition(1, "Close the terminal")]
+ public async Task OnStop_MANUAL_TEST()
+ {
+ CreateCompButton("Click me!! Test: Launch ComponentBased Application");
+ _comp_button.Clicked += OnClick;
+
+ /* TEST CODE */
+ await ManualTest.WaitForConfirm();
+ _comp_button.Clicked -= OnClick;
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test : Gets display status of the current device")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.Common.FrameComponent.DisplayStatus A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
+ [Precondition(1, "Enter command \"sdb dlog -c\" to clear log")]
+ [Precondition(2, "Enter command \"sdb dlog ComponentBasedTest\" to terminal")]
+ [Precondition(3, "The device LCD should be on")]
+ [Step(1, "Click run TC")]
+ [Step(2, "Press 'Click me' button")]
+ [Step(3, "Check if log show \"ComponentBasedTest: OnResume > DisplayStatus(On)\".")]
+ [Postcondition(1, "Close the terminal")]
+ [Postcondition(2, "Press launched application's 'Exit' button")]
+ public async Task DisplayStatus_MANUAL_TEST()
+ {
+ CreateCompButton("Click me!! Test: Launch ComponentBased Application");
+ _comp_button.Clicked += OnClick;
+
+ /* TEST CODE */
+ await ManualTest.WaitForConfirm();
+ _comp_button.Clicked -= OnClick;
+ }
+ }
+}
+
+
+
--- /dev/null
+/*
+ * 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 System;
+using System.Threading.Tasks;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.Applications;
+using Xamarin.Forms;
+
+namespace Tizen.ComponentBasedApplication.Tests
+{
+ [TestFixture]
+ [Description("Tizen.Applications.ComponentBasedApplication service component test")]
+ public class ServiceComponentTests
+ {
+ private TestPage _testPage = TestPage.GetInstance();
+ private Button _comp_button;
+ private string _testAppId = "org.tizen.example.EFLComponentBasedTest";
+ private bool _isMobile = false;
+ private bool _isWearable = false;
+ private bool _isEmulator = false;
+
+ [SetUp]
+ public void Init()
+ {
+ LogUtils.Write(LogUtils.INFO, LogUtils.TAG, "Preconditions for each TEST");
+ _isMobile = ManualTest.IsMobile();
+ _isWearable = ManualTest.IsWearable();
+ _isEmulator = ManualTest.IsEmulator();
+ _comp_button = new Button();
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ LogUtils.Write(LogUtils.INFO, LogUtils.TAG, "Postconditions for each TEST");
+ _comp_button = null;
+ }
+
+ private void CreateCompButton(string btnText)
+ {
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "CreateButton");
+ var layout = new StackLayout()
+ {
+ IsVisible = true,
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ };
+
+ _comp_button = new Button()
+ {
+ Text = btnText,
+ FontSize = 20,
+ VerticalOptions = LayoutOptions.Center,
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ };
+
+ layout.Children.Add(_comp_button);
+ _testPage.ExecuteTC(layout);
+ }
+
+ private void OnClick(object sender, EventArgs e)
+ {
+ AppControl control = new AppControl();
+ control.ApplicationId = _testAppId;
+ control.Operation = AppControlOperations.Default;
+ AppControl.SendLaunchRequest(control);
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("MANUAL TEST : OnCreate() should be called after the application is launched")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.Common.ServiceComponent.OnCreate M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
+ [Precondition(1, "Enter command \"sdb dlog -c\" to clear log")]
+ [Precondition(2, "Enter command \"sdb dlog EFLComponentBasedTest\" to terminal")]
+ [Step(1, "Click run TC")]
+ [Step(2, "Press 'Click me' button")]
+ [Step(3, "Check if log show \"EFLComponentBasedTest: OnCreate\".")]
+ [Postcondition(1, "Close the terminal")]
+ public async Task OnCreate_MANUAL_TEST()
+ {
+ CreateCompButton("Click me!! Test: Launch ComponentBased Application");
+ _comp_button.Clicked += OnClick;
+
+ /* TEST CODE */
+ await ManualTest.WaitForConfirm();
+ _comp_button.Clicked -= OnClick;
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("MANUAL TEST : OnDestroy() should be called before OnFinished function is called")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.Common.ServiceComponent.OnDestroy M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
+ [Precondition(1, "Enter command \"sdb dlog -c\" to clear log")]
+ [Precondition(2, "Enter command \"sdb dlog EFLComponentBasedTest\" to terminal")]
+ [Step(1, "Click run TC")]
+ [Step(2, "Press 'Click me' button")]
+ [Step(3, "Check if log show \"EFLComponentBasedTest: OnDestroy\".")]
+ [Postcondition(1, "Close the terminal")]
+ public async Task OnDestroy_MANUAL_TEST()
+ {
+ CreateCompButton("Click me!! Test: Launch ComponentBased Application");
+ _comp_button.Clicked += OnClick;
+
+ /* TEST CODE */
+ await ManualTest.WaitForConfirm();
+ _comp_button.Clicked -= OnClick;
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("MANUAL TEST : OnStartCommand() should be called after the OnRestoreContents function is called")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.Common.ServiceComponent.OnStartCommand M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
+ [Precondition(1, "Enter command \"sdb dlog -c\" to clear log")]
+ [Precondition(2, "Enter command \"sdb dlog EFLComponentBasedTest\" to terminal")]
+ [Step(1, "Click run TC")]
+ [Step(2, "Press 'Click me' button")]
+ [Step(3, "Check if log show \"EFLComponentBasedTest: OnStartCommand\" after \"EFLComponentBasedTest: OnRestoreContents\".")]
+ [Postcondition(1, "Close the terminal")]
+ public async Task OnStartCommand_MANUAL_TEST()
+ {
+ CreateCompButton("Click me!! Test: Launch ComponentBased Application");
+ _comp_button.Clicked += OnClick;
+
+ /* TEST CODE */
+ await ManualTest.WaitForConfirm();
+ _comp_button.Clicked -= OnClick;
+ }
+ }
+}
+
+
+
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="6" package="Tizen.ComponentBased.Manual.Tests" version="1.0.0">
+ <profile name="common" />
+ <ui-application appid="Tizen.ComponentBased.Manual.Tests"
+ exec="Tizen.ComponentBased.Manual.Tests.dll"
+ type="dotnet"
+ multiple="false"
+ taskmanage="true"
+ launch_mode="single">
+ <icon>Tizen.ComponentBased.Manual.Tests.png</icon>
+ <label>Tizen.ComponentBased.Manual.Tests</label>
+ <background-category value="background-network" />
+ <background-category value="iot-communication" />
+ <background-category value="location" />
+ <background-category value="media" />
+ <background-category value="sensor" />
+ </ui-application>
+ <privileges>
+ <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
+ </privileges>
+</manifest>
--- /dev/null
+/*
+ * 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 System;
+using NUnitLite.TUnit;
+using AutoTemplate;
+
+namespace XamarinForTizen.Tizen
+{
+
+ class Program : global::Xamarin.Forms.Platform.Tizen.FormsApplication
+ {
+ private static App _app;
+ protected override void OnCreate()
+ {
+ base.OnCreate();
+
+ Console.WriteLine("TCT : OnCreate()");
+ _app = new App();
+ LoadApplication(_app);
+
+ TRunner t = new TRunner();
+ t.LoadTestsuite();
+ t.Execute();
+ }
+
+ public static App getApp()
+ {
+ return _app;
+ }
+ static void Main(string[] args)
+ {
+ Console.WriteLine("TCT : Main()");
+ var app = new Program();
+ global::Xamarin.Forms.Platform.Tizen.Forms.Init(app);
+ app.Run(args);
+ }
+ }
+}
--- /dev/null
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <!-- Property Group for .NET Core Project -->
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>tizen60</TargetFramework>
+ </PropertyGroup>
+
+ <!-- Property Group for Tizen Project -->
+ <PropertyGroup>
+ <TizenCreateTpkOnBuild>true</TizenCreateTpkOnBuild>
+ </PropertyGroup>
+
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugType>portable</DebugType>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>None</DebugType>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <Folder Include="lib\" />
+ </ItemGroup>
+
+ <Import Project="..\Common\dependencies.props" />
+
+ <ItemGroup>
+ <PackageReference Include="Tizen.NET" Version="$(TizenNETVersion)">
+ <ExcludeAssets>Runtime</ExcludeAssets>
+ </PackageReference>
+ <PackageReference Include="Tizen.NET.Sdk" Version="$(TizenNETSdkVersion)" />
+ </ItemGroup>
+
+ <!-- Include Nuget Package for Tizen Project building -->
+ <ItemGroup>
+ <ProjectReference Include="..\Template\AutoTemplate\AutoTemplate.csproj" />
+ </ItemGroup>
+ <ItemGroup>
+ <Reference Include="Tizen.Applications.ComponentBased">
+ <HintPath>..\..\..\source\TizenFX\src\Tizen.Applications.ComponentBased.Default\bin\Debug\netstandard2.0\Tizen.Applications.ComponentBased.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+
+</Project>
--- /dev/null
+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
--- /dev/null
+/*
+ * 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 BaseComp : BaseComponent
+ {
+ }
+
+ [TestFixture]
+ [Description("BaseComponent Class Tests")]
+ public class BaseComponentTests {
+
+ [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");
+ }
+
+ private void ReplyReceivedCallback(AppControl launchRequest, AppControl replyRequest, AppControlReplyResult result)
+ {
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Test : SendLaunchRequest with null parameter should throw the argument exception")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.Common.BaseComponent.SendLaunchRequestAsync M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
+ [Property("COVPARAM", "System.Type, string")]
+ public void SendLaunchRequestAsync_ArgumentException()
+ {
+ FrameComp comp = new FrameComp();
+ Assert.Throws<ArgumentNullException>(() => comp.SendLaunchRequestAsync(null, ReplyReceivedCallback));
+ }
+
+
+ [Test]
+ [Category("P1")]
+ [Description("Create a base component which will be used by component-based applications")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.Common.BaseComponent.BaseComponent C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
+ public void BaseComponent_INIT()
+ {
+ var comp = new BaseComp();
+ Assert.NotNull(comp, "Should not return NULL");
+ Assert.IsInstanceOf<BaseComponent>(comp, "Should return BaseComponent.");
+ }
+ }
+}
--- /dev/null
+/*
+ * 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;
+ }
+ }
+ }
+
+ 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"));
+ }
+ }
+}
--- /dev/null
+/*
+ * 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 {
+
+ [TestFixture]
+ [Description("FrameComponent Class Tests")]
+ public class FrameComponentTests {
+
+ [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");
+ }
+
+ private void ReplyReceivedCallback(AppControl launchRequest, AppControl replyRequest, AppControlReplyResult result)
+ {
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Test : DisplayStatus throw exception when invalid component requests display status")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.Common.FrameComponent.DisplayStatus A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
+ public void DisplayStatus_InvalidOperationException()
+ {
+ FrameComp comp = new FrameComp();
+ DisplayStatus dis;
+ Assert.Throws<InvalidOperationException>(() => dis = comp.DisplayStatus);
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Create a frame component which will be used by component-based applications")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.Common.FrameComponent.FrameComponent C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
+ public void FrameComponent_INIT()
+ {
+ var comp = new FrameComp();
+ Assert.NotNull(comp, "Should not return NULL");
+ Assert.IsInstanceOf<FrameComp>(comp, "Should return FrameComp.");
+ }
+ }
+}
--- /dev/null
+/*
+ * 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 {
+
+ [TestFixture]
+ [Description("ServiceComponent Class Tests")]
+ public class ServiceComponentTests {
+
+ [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");
+ }
+
+ private void ReplyReceivedCallback(AppControl launchRequest, AppControl replyRequest, AppControlReplyResult result)
+ {
+ }
+
+ public class ServiceComp : ServiceComponent
+ {
+ public override bool OnCreate()
+ {
+ return true;
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Create a service component which will be used by component-based applications")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.Common.ServiceComponent.ServiceComponent C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
+ public void ServiceComponent_INIT()
+ {
+ var comp = new ServiceComp();
+ Assert.NotNull(comp, "Should not return NULL");
+ Assert.IsInstanceOf<ServiceComp>(comp, "Should return ServiceComp.");
+ }
+ }
+}
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="6" package="Tizen.ComponentBased.Tests" version="1.0.0">
+ <profile name="common" />
+ <ui-application appid="Tizen.ComponentBased.Tests"
+ exec="Tizen.ComponentBased.Tests.dll"
+ type="dotnet"
+ multiple="false"
+ taskmanage="true"
+ launch_mode="single">
+ <icon>Tizen.ComponentBased.Tests.png</icon>
+ <label>Tizen.ComponentBased.Tests</label>
+ </ui-application>
+ <privileges>
+ <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
+ </privileges>
+</manifest>
{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
- {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}.NUI|Any CPU.ActiveCfg = Debug|Any CPU
- {D36CED01-29BD-4EB3-8903-62E0BF2A822D}.NUI|Any CPU.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
{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}.NUI|Any CPU.ActiveCfg = Debug|Any CPU
- {269F89A7-E648-4811-8421-844E00ACF5F0}.NUI|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