{
Log.Info(LogTag, "Main()");
Dictionary<Type, string> _typeInfo = new Dictionary<Type, string>();
- _typeInfo.Add(typeof(FrameComponentSample), "org.example.frame-component");
- _typeInfo.Add(typeof(ServiceComponentSample), "org.example.service-component");
- _typeInfo.Add(typeof(ServiceComponentSample2), "org.example.bg-service-component");
+ _typeInfo.Add(typeof(FrameComponentSample), "org.tizen.example.frame-component");
+ _typeInfo.Add(typeof(ServiceComponentSample), "org.tizen.example.service-component");
+ _typeInfo.Add(typeof(ServiceComponentSample2), "org.tizen.example.bg-service-component");
var app = new EFLComponentBasedApplication(_typeInfo);
app.Run(args);
}
<label>ComponentBasedSample</label>
<icon>ComponentBasedSample.png</icon>
<metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />
- <frame-component id="org.example.frame-component" taskmanage="true" icon-display="true" main="true">
+ <frame-component id="org.tizen.example.frame-component" taskmanage="true" icon-display="true" main="true">
<label>FrameComponentSample</label>
<icon>FrameComponentSample.png</icon>
+ <label xml:lang="en-gb">FrameComponentSample</label>
+ <label xml:lang="ko-kr">프레임 컴포넌트 샘플</label>
</frame-component>
- <service-component id="org.example.service-component" main="false">
+ <service-component id="org.tizen.example.service-component" main="false">
<label>ServiceComponentSample</label>
</service-component>
</component-based-application>
<label>ComponentBasedSample2</label>
<icon>ComponentBasedSample2.png</icon>
<metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />
- <service-component id="org.example.bg-service-component" main="true">
+ <service-component id="org.tizen.example.bg-service-component" main="true">
<label>BGServiceComponentSample</label>
</service-component>
</component-based-application>
--- /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 System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tizen;
+
+namespace Tizen.Applications.ComponentBased.Tests
+{
+ [TestFixture]
+ [Description("Tizen.Applications.ComponentBased.ComponentInfo Tests")]
+ public class TSComponentInfo
+ {
+ private const string LogTag = "ComponentManager.Tests";
+ private const string CompoId = "org.tizen.example.frame-component";
+ private const string ServiceCompoId = "org.tizen.example.service-component";
+ private const string AppId = "org.tizen.example.ComponentBasedSample";
+ private const string IconPath = "shared/res/FrameComponentSample.png";
+ private const string CompoLabel = "FrameComponentSample";
+ private const string CompoLocalizedLabel = "ÇÁ·¹ÀÓ ÄÄÆ÷³ÍÆ® »ùÇÃ";
+ private ComponentInfo _compoInfo;
+ private ComponentInfo _svcCompoInfo;
+
+ [SetUp]
+ public void Init()
+ {
+ Log.Debug(LogTag, "Preconditions for each TEST");
+ _compoInfo = new ComponentInfo(CompoId);
+ _svcCompoInfo = new ComponentInfo(ServiceCompoId);
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ Log.Debug(LogTag, "Postconditions for each TEST");
+ _compoInfo = null;
+ _svcCompoInfo = null;
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test ComponentInfo method initialization")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.ComponentInfo.ComponentInfo C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "Hwankyu Jhun, h.jhun@samsung.com")]
+ [Property("CONVPARAM", "string")]
+ public void ComponentInfo_INIT()
+ {
+ Log.Debug(LogTag, "START");
+ var compoInfo = new ComponentInfo(CompoId);
+ Assert.IsInstanceOf<ComponentInfo>(compoInfo);
+ Assert.AreEqual(compoInfo.ComponentId, CompoId, "Component ID should be same " + CompoId);
+ Log.Debug(LogTag, "END");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Test ComponentInfo method initialization with invalid argument")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.ComponentInfo.ComponentInfo C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTX")]
+ [Property("AUTHOR", "Hwankyu Jhun, h.jhun@samsung.com")]
+ [Property("CONVPARAM", "string")]
+ public void ComponentInfo_CHECK_ArgumentException()
+ {
+ Log.Debug(LogTag, "START");
+ try
+ {
+ var compoInfo = new ComponentInfo("Unknown component");
+ }
+ catch (ArgumentException)
+ {
+ Assert.Pass();
+ }
+ Log.Debug(LogTag, "END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test property ComponentId of ComponentInfo")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.ComponentInfo.ComponentId A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "Hwankyu Jhun, h.jhun@samsung.com")]
+ public void ComponentId_GET()
+ {
+ Log.Debug(LogTag, "START");
+ Assert.AreEqual(CompoId, _compoInfo.ComponentId, "Component ID(" + _compoInfo.ComponentId + ") is not correct");
+ Log.Debug(LogTag, "END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test property ApplicationId of ComponentInfo")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.ComponentInfo.ApplicationId A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "Hwankyu Jhun, h.jhun@samsung.com")]
+ public void ApplicationId_GET()
+ {
+ Log.Debug(LogTag, "START");
+ Assert.AreEqual(AppId, _compoInfo.ApplicationId, "Application ID(" + _compoInfo.ApplicationId + ") is not correct");
+ Log.Debug(LogTag, "END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test property ComponentType of ComponentInfo")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.ComponentInfo.ComponentType A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "Hwankyu Jhun, h.jhun@samsung.com")]
+ public void ComponentType_GET()
+ {
+ Log.Debug(LogTag, "START");
+ Assert.AreEqual(ComponentType.Frame, _compoInfo.ComponentType, "Component Type(" + _compoInfo.ComponentType + ") is not correct");
+ Assert.AreEqual(ComponentType.Service, _svcCompoInfo.ComponentType, "Component Type(" + _svcCompoInfo.ComponentType + ") is not correct");
+ Log.Debug(LogTag, "END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test property IsIconDisplayed of ComponentInfo")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.ComponentInfo.IsIconDisplayed A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "Hwankyu Jhun, h.jhun@samsung.com")]
+ public void IsIconDisplayed_GET()
+ {
+ Log.Debug(LogTag, "START");
+ Assert.IsTrue(_compoInfo.IsIconDisplayed, "Component should be displayed on the home screen");
+ Log.Debug(LogTag, "END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test property IsManagedByTaskManager of ComponentInfo")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.ComponentInfo.IsManagedByTaskManager A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "Hwankyu Jhun, h.jhun@samsung.com")]
+ public void IsManagedByTaskManager_GET()
+ {
+ Log.Debug(LogTag, "START");
+ Assert.IsTrue(_compoInfo.IsManagedByTaskManager, "Component should be managed by task-manager");
+ Log.Debug(LogTag, "END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test property IconPath of ComponentInfo")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.ComponentInfo.IconPath A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "Hwankyu Jhun, h.jhun@samsung.com")]
+ public void IconPath_GET()
+ {
+ Log.Debug(LogTag, "START");
+ Assert.IsTrue(_compoInfo.IconPath.Contains(IconPath), "Icon path(" + _compoInfo.IconPath + ") is not correct");
+ Log.Debug(LogTag, "END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test property Label of ComponentInfo")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.ComponentInfo.Label A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "Hwankyu Jhun, h.jhun@samsung.com")]
+ public void Label_GET()
+ {
+ Log.Debug(LogTag, "START");
+ Assert.AreEqual(CompoLabel, _compoInfo.Label, "Label(" + _compoInfo.Label + ") is not correct");
+ Log.Debug(LogTag, "END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Get localized label.")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.ComponentInfo.GetLocalizedLabel M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Hwankyu Jhun, h.jhun@samsung.com")]
+ public void GetLocalizedLabel_RETURN_VALUE()
+ {
+ Log.Debug(LogTag, "START");
+ Assert.AreEqual(CompoLabel, _compoInfo.Label, "Label of " + CompoId + " is not correct");
+ Assert.AreEqual(CompoLabel, _compoInfo.GetLocalizedLabel("en-gb"), "GetLocalizedLabel with key is en-gb should be work normally");
+ Assert.AreEqual(CompoLocalizedLabel, _compoInfo.GetLocalizedLabel("ko-kr"), "GetLocalizedLabel with key is ko-kr should be work normally");
+ Log.Debug(LogTag, "END");
+ }
+ }
+}
+++ /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 System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Tizen;
-
-namespace Tizen.Applications.ComponentBased.Tests
-{
- [TestFixture]
- [Description("Tizen.Applications.ComponentBased.ComponentInfo Tests")]
- public class TSComponentInfocs
- {
- private const string LogTag = "ComponentManager.Tests";
- private const string CompoId = "org.example.frame-component";
- private const string ServiceCompoId = "org.example.service-component";
- private const string AppId = "org.tizen.example.ComponentBasedSample";
- private const string IconPath = "shared/res/FrameComponentSample.png";
- private const string CompoLabel = "FrameComponentSample";
- private const string CompoLocalizedLabel = "FrameComponentSample";
- private ComponentInfo _compoInfo;
- private ComponentInfo _svcCompoInfo;
-
- [SetUp]
- public void Init()
- {
- Log.Debug(LogTag, "Preconditions for each TEST");
- _compoInfo = new ComponentInfo(CompoId);
- _svcCompoInfo = new ComponentInfo(ServiceCompoId);
- }
-
- [TearDown]
- public void Destroy()
- {
- Log.Debug(LogTag, "Postconditions for each TEST");
- _compoInfo = null;
- _svcCompoInfo = null;
- }
-
- [Test]
- [Category("P1")]
- [Description("Test ComponentInfo method initialization")]
- [Property("SPEC", "Tizen.Applications.ComponentBased.ComponentInfo.ComponentInfo C")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "CONSTR")]
- [Property("AUTHOR", "Hwankyu Jhun, h.jhun@samsung.com")]
- [Property("CONVPARAM", "string")]
- public void ComponentInfo_INIT()
- {
- Log.Debug(LogTag, "START");
- var compoInfo = new ComponentInfo(CompoId);
- Assert.IsInstanceOf<ComponentInfo>(compoInfo);
- Assert.AreEqual(compoInfo.ComponentId, CompoId, "Component ID should be same " + CompoId);
- Log.Debug(LogTag, "END");
- }
-
- [Test]
- [Category("P2")]
- [Description("Test ComponentInfo method initialization with invalid argument")]
- [Property("SPEC", "Tizen.Applications.ComponentBased.ComponentInfo.ComponentInfo C")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "CONSTX")]
- [Property("AUTHOR", "Hwankyu Jhun, h.jhun@samsung.com")]
- [Property("CONVPARAM", "string")]
- public void ComponentInfo_CHECK_ArgumentException()
- {
- Log.Debug(LogTag, "START");
- try
- {
- var compoInfo = new ComponentInfo("Unknown component");
- }
- catch (ArgumentException)
- {
- Assert.Pass();
- }
- Log.Debug(LogTag, "END");
- }
-
- [Test]
- [Category("P1")]
- [Description("Test property ComponentId of ComponentInfo")]
- [Property("SPEC", "Tizen.Applications.ComponentBased.ComponentInfo.ComponentId A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
- [Property("AUTHOR", "Hwankyu Jhun, h.jhun@samsung.com")]
- public void ComponentId_GET()
- {
- Log.Debug(LogTag, "START");
- Assert.AreEqual(CompoId, _compoInfo.ComponentId, "Component ID(" + _compoInfo.ComponentId + ") is not correct");
- Log.Debug(LogTag, "END");
- }
-
- [Test]
- [Category("P1")]
- [Description("Test property ApplicationId of ComponentInfo")]
- [Property("SPEC", "Tizen.Applications.ComponentBased.ComponentInfo.ApplicationId A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
- [Property("AUTHOR", "Hwankyu Jhun, h.jhun@samsung.com")]
- public void ApplicationId_GET()
- {
- Log.Debug(LogTag, "START");
- Assert.AreEqual(AppId, _compoInfo.ApplicationId, "Application ID(" + _compoInfo.ApplicationId + ") is not correct");
- Log.Debug(LogTag, "END");
- }
-
- [Test]
- [Category("P1")]
- [Description("Test property ComponentType of ComponentInfo")]
- [Property("SPEC", "Tizen.Applications.ComponentBased.ComponentInfo.ComponentType A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
- [Property("AUTHOR", "Hwankyu Jhun, h.jhun@samsung.com")]
- public void ComponentType_GET()
- {
- Log.Debug(LogTag, "START");
- Assert.AreEqual(ComponentType.Frame, _compoInfo.ComponentType, "Component Type(" + _compoInfo.ComponentType + ") is not correct");
- Assert.AreEqual(ComponentType.Service, _svcCompoInfo.ComponentType, "Component Type(" + _svcCompoInfo.ComponentType + ") is not correct");
- Log.Debug(LogTag, "END");
- }
-
- [Test]
- [Category("P1")]
- [Description("Test property IsIconDisplayed of ComponentInfo")]
- [Property("SPEC", "Tizen.Applications.ComponentBased.ComponentInfo.IsIconDisplayed A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
- [Property("AUTHOR", "Hwankyu Jhun, h.jhun@samsung.com")]
- public void IsIconDisplayed_GET()
- {
- Log.Debug(LogTag, "START");
- Assert.IsTrue(_compoInfo.IsIconDisplayed, "Component should be displayed on the home screen");
- Log.Debug(LogTag, "END");
- }
-
- [Test]
- [Category("P1")]
- [Description("Test property IsManagedByTaskManager of ComponentInfo")]
- [Property("SPEC", "Tizen.Applications.ComponentBased.ComponentInfo.IsManagedByTaskManager A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
- [Property("AUTHOR", "Hwankyu Jhun, h.jhun@samsung.com")]
- public void IsManagedByTaskManager_GET()
- {
- Log.Debug(LogTag, "START");
- Assert.IsTrue(_compoInfo.IsManagedByTaskManager, "Component should be managed by task-manager");
- Log.Debug(LogTag, "END");
- }
-
- [Test]
- [Category("P1")]
- [Description("Test property IconPath of ComponentInfo")]
- [Property("SPEC", "Tizen.Applications.ComponentBased.ComponentInfo.IconPath A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
- [Property("AUTHOR", "Hwankyu Jhun, h.jhun@samsung.com")]
- public void IconPath_GET()
- {
- Log.Debug(LogTag, "START");
- Assert.IsTrue(_compoInfo.IconPath.Contains(IconPath), "Icon path(" + _compoInfo.IconPath + ") is not correct");
- Log.Debug(LogTag, "END");
- }
-
- [Test]
- [Category("P1")]
- [Description("Test property Label of ComponentInfo")]
- [Property("SPEC", "Tizen.Applications.ComponentBased.ComponentInfo.Label A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
- [Property("AUTHOR", "Hwankyu Jhun, h.jhun@samsung.com")]
- public void Label_GET()
- {
- Log.Debug(LogTag, "START");
- Assert.AreEqual(CompoLabel, _compoInfo.Label, "Label(" + _compoInfo.Label + ") is not correct");
- Log.Debug(LogTag, "END");
- }
-
- [Test]
- [Category("P1")]
- [Description("Get localized label.")]
- [Property("SPEC", "Tizen.Applications.ComponentBased.ComponentInfo.GetLocalizedLabel M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "Hwankyu Jhun, h.jhun@samsung.com")]
- public void GetLocalizedLabel_RETURN_VALUE()
- {
- Log.Debug(LogTag, "START");
- Assert.AreEqual(CompoLabel, _compoInfo.Label, "Label of " + CompoId + " is not correct");
- Assert.AreEqual(CompoLabel, _compoInfo.GetLocalizedLabel("en-gb"), "GetLocalizedLabel with key is en-gb should be work normally");
- Assert.AreEqual(CompoLocalizedLabel, _compoInfo.GetLocalizedLabel("ko-kr"), "GetLocalizedLabel with key is ko-kr should be work normally");
- Log.Debug(LogTag, "END");
- }
- }
-}
private IEnumerable<ComponentInfo> _listCompo;\r
private IEnumerable<ComponentRunningContext> _listCompoRun;\r
private const string AppId = "org.tizen.example.ComponentBasedSample2";\r
- private const string CompoId = "org.example.bg-service-component";\r
+ private const string CompoId = "org.tizen.example.bg-service-component";\r
private bool _flag;\r
\r
[SetUp]\r
{
private const string LogTag = "ComponentManager.Tests";
private const string AppId = "org.tizen.example.ComponentBasedSample";
- private const string CompoId = "org.example.frame-component";
+ private const string CompoId = "org.tizen.example.frame-component";
private ComponentRunningContext _context;
[SetUp]