From 7548be719096b2bcb71587b26fafa5a6eb7cbc98 Mon Sep 17 00:00:00 2001 From: Jeonghyun Yun Date: Mon, 11 Feb 2019 16:50:08 +0900 Subject: [PATCH] [Non-ACR][ElmSharp][reinforcement testcase coverage] Change-Id: I2dad2ad3c18faeac326210d8f3fb72bac0adf386 Signed-off-by: Jeonghyun Yun --- .../Tizen.ElmSharp.Tests/testcase/TSElementary.cs | 21 ++++++++++- .../testcase/TSFlipSelectorItem.cs | 26 +++++++++++-- .../Tizen.ElmSharp.Tests/testcase/TSIndexItem.cs | 24 ++++++++++-- .../Tizen.ElmSharp.Tests/testcase/TSItemObject.cs | 43 +++++++++++++++++++--- 4 files changed, 99 insertions(+), 15 deletions(-) mode change 100755 => 100644 tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSFlipSelectorItem.cs mode change 100755 => 100644 tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSIndexItem.cs mode change 100755 => 100644 tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSItemObject.cs diff --git a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSElementary.cs b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSElementary.cs index db313bc..194b1f3 100644 --- a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSElementary.cs +++ b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSElementary.cs @@ -29,6 +29,11 @@ namespace ElmSharp.Tests private Boolean _flagRealized; private MainWindow _window = MainWindow.GetInstance(); + private void OnRealized(object sender, EventArgs e) + { + _flagRealized = true; + } + [SetUp] public void Init() { @@ -496,9 +501,21 @@ namespace ElmSharp.Tests Elementary.EvasObjectRealized -= OnRealized; } - private void OnRealized(object sender, EventArgs e) + [Test] + [Category("P1")] + [Description("Check whether ItemObjectRealized Event is raised.")] + [Property("SPEC", "ElmSharp.Elementary.ItemObjectRealized E")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "EVL")] + [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")] + public void ItemObjectRealized_EVENT() { - _flagRealized = true; + _flagRealized = false; + Elementary.ItemObjectRealized += OnRealized; + ContextPopup ctxpopup = new ContextPopup(_window); + ctxpopup.Append("Test"); + Assert.IsTrue(_flagRealized, "Event ItemObjectRealized should be handled."); + Elementary.ItemObjectRealized -= OnRealized; } } } diff --git a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSFlipSelectorItem.cs b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSFlipSelectorItem.cs old mode 100755 new mode 100644 index 4981726..06d6e34 --- a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSFlipSelectorItem.cs +++ b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSFlipSelectorItem.cs @@ -29,6 +29,7 @@ namespace ElmSharp.Tests public class FlipSelectorItemTests { private FlipSelectorItem _flipSelectorItem; + private MainWindow _window = MainWindow.GetInstance(); [SetUp] public void Init() @@ -55,13 +56,30 @@ namespace ElmSharp.Tests [Category("P1")] [Description("Create a FlipSelectorItem instance. Check whether object is successfully created or not.")] [Property("SPEC", "ElmSharp.FlipSelectorItem.FlipSelectorItem C")] + [Property("COVPARAM", "string")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "CONSTR")] [Property("AUTHOR", "Yan Zhao, yan97.zhao@samsung.com")] - public void FlipSelectorItem_CONST() + public void FlipSelectorItem_PARAM1_CONST() { - _flipSelectorItem = new FlipSelectorItem("Flp"); - Assert.IsNotNull(_flipSelectorItem, "Cannot successfully create FlipSelectorItem object"); + var _flipSelectorItem_CONST = new FlipSelectorItem("Flip"); + Assert.IsNotNull(_flipSelectorItem_CONST, "Cannot successfully create FlipSelectorItem object"); + Assert.IsInstanceOf(_flipSelectorItem_CONST, "Should return FlipSelectorItem instance"); + } + + [Test] + [Category("P1")] + [Description("Create a FlipSelectorItem instance. Check whether object is successfully created or not.")] + [Property("SPEC", "ElmSharp.FlipSelectorItem.FlipSelectorItem C")] + [Property("COVPARAM", "string, ElmSharp.EvasObject")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")] + public void FlipSelectorItem_PARAM2_CONST() + { + var _flipSelectorItem_CONST = new FlipSelectorItem("Flip", _window); + Assert.IsNotNull(_flipSelectorItem_CONST, "Cannot successfully create FlipSelectorItem object"); + Assert.IsInstanceOf(_flipSelectorItem_CONST, "Should return FlipSelectorItem instance"); } [Test] @@ -77,4 +95,4 @@ namespace ElmSharp.Tests Assert.NotNull(_flipSelectorItem.Text, "Text Should be readable"); } } -} \ No newline at end of file +} diff --git a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSIndexItem.cs b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSIndexItem.cs old mode 100755 new mode 100644 index d98118f..ec96d37 --- a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSIndexItem.cs +++ b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSIndexItem.cs @@ -48,14 +48,30 @@ namespace ElmSharp.Tests [Category("P1")] [Description("Create a IndexItem instance. Check whether object is successfully created or not.")] [Property("SPEC", "ElmSharp.IndexItem.IndexItem C")] + [Property("COVPARAM", "string")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "CONSTR")] [Property("AUTHOR", "Li Hongqing, hongqing.li@samsung.com")] - public void IndexItem_CONST() + public void IndexItem_PARAM1_CONST() { - IndexItem indexItem_CONST = new IndexItem("test"); - Assert.IsNotNull(indexItem_CONST, "Cannot successfully create Box object"); - indexItem_CONST = null; + var indexItem_CONST = new IndexItem("test"); + Assert.IsNotNull(indexItem_CONST, "Cannot successfully create IndexItem object"); + Assert.IsInstanceOf(indexItem_CONST, "Should return IndexItem instance"); + } + + [Test] + [Category("P1")] + [Description("Create a IndexItem instance. Check whether object is successfully created or not.")] + [Property("SPEC", "ElmSharp.IndexItem.IndexItem C")] + [Property("COVPARAM", "string, ElmSharp.EvasObject")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")] + public void IndexItem_PARAM2_CONST() + { + var indexItem_CONST = new IndexItem("test", _window); + Assert.IsNotNull(indexItem_CONST, "Cannot successfully create IndexItem object"); + Assert.IsInstanceOf(indexItem_CONST, "Should return IndexItem instance"); } [Test] diff --git a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSItemObject.cs b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSItemObject.cs old mode 100755 new mode 100644 index 9c702c2..58ebd1e --- a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSItemObject.cs +++ b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSItemObject.cs @@ -29,6 +29,10 @@ namespace ElmSharp.Tests public ItemObject_T(IntPtr handle) : base(handle) { } + + public ItemObject_T(IntPtr handle, EvasObject parent) : base(handle, parent) + { + } } [TestFixture] @@ -127,14 +131,30 @@ namespace ElmSharp.Tests [Category("P1")] [Description("Create a ItemObject instance. Check whether object is successfully created or not.")] [Property("SPEC", "ElmSharp.ItemObject.ItemObject C")] + [Property("COVPARAM", "string")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "CONSTR")] [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")] - public void _ItemObject_CONST() + public void ItemObject_PARAM1_CONST() + { + var _ItemObject_CONST = new ItemObject_T(new IntPtr(2)); + Assert.IsNotNull(_ItemObject_CONST, "Cannot successfully create ItemObject_T object"); + Assert.IsInstanceOf(_ItemObject_CONST, "Should return ItemObject_T instance"); + } + + [Test] + [Category("P1")] + [Description("Create a ItemObject instance. Check whether object is successfully created or not.")] + [Property("SPEC", "ElmSharp.ItemObject.ItemObject C")] + [Property("COVPARAM", "string, ElmSharp.EvasObject")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")] + public void ItemObject_PARAM2_CONST() { - ItemObject_T _ItemObject_CONST = new ItemObject_T(new IntPtr(2)); - Assert.IsNotNull(_ItemObject_CONST, "Cannot successfully create Box object"); - _ItemObject_CONST = null; + var _ItemObject_CONST = new ItemObject_T(new IntPtr(2), _window); + Assert.IsNotNull(_ItemObject_CONST, "Cannot successfully create ItemObject_T object"); + Assert.IsInstanceOf(_ItemObject_CONST, "Should return ItemObject_T instance"); } [Test] @@ -414,5 +434,18 @@ namespace ElmSharp.Tests Assert.AreEqual("anchor", _hoverselItem.Style, "The Style value should be anchor."); } + + [Test] + [Category("P1")] + [Description("Check whether get value of ItemObject's parent")] + [Property("SPEC", "ElmSharp.ItemObject.Parent A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRO")] + [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")] + public void Parent_PROPERTY_GET() + { + var parent = _hoverselItem.Parent; + Assert.IsInstanceOf(parent); + } } -} \ No newline at end of file +} -- 2.7.4