From: Jeonghyun Yun Date: Mon, 11 Feb 2019 07:50:08 +0000 (+0900) Subject: [Non-ACR][ElmSharp][reinforcement testcase coverage] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7548be719096b2bcb71587b26fafa5a6eb7cbc98;p=test%2Ftct%2Fcsharp%2Fapi.git [Non-ACR][ElmSharp][reinforcement testcase coverage] Change-Id: I2dad2ad3c18faeac326210d8f3fb72bac0adf386 Signed-off-by: Jeonghyun Yun --- 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 +}