From e326b05aa9b216561066425da1142ccce18027a2 Mon Sep 17 00:00:00 2001 From: Dongsug Song Date: Mon, 24 Feb 2020 22:12:49 +0900 Subject: [PATCH] [Non-ACR][NUI][Fix tw3 fail issue, TSIX-307] Change-Id: I427b621962b810126272cd8efad5e553802f2ab9 Signed-off-by: Dongsug Song --- .../Tizen.NUI.Tests/testcase/TSCustomView.cs | 62 +- tct-suite-vs/Tizen.NUI.Tests/testcase/TSPopup.cs | 1021 ++++++++++---------- .../Tizen.NUI.Tests/testcase/TSProgressBar.cs | 66 +- 3 files changed, 611 insertions(+), 538 deletions(-) diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSCustomView.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSCustomView.cs index 9a72ecc..cae752e 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSCustomView.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSCustomView.cs @@ -9,6 +9,7 @@ using System.Threading.Tasks; namespace Tizen.NUI.Tests { + using tlog = Tizen.Log; [TestFixture] [Description("Tizen.NUI.BaseComponents.CustomView Tests")] @@ -648,15 +649,19 @@ namespace Tizen.NUI.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] [Property("AUTHOR", "Wenfeng Ge, wenfeng.ge@samsung.com")] - public void OnFocusGained_CHECK_VALUE() + public async Task OnFocusGained_CHECK_VALUE() { /* TEST CODE */ - Window window = Window.Instance; - MyCustomView view = new MyCustomView("CustomView", CustomViewBehaviour.ViewBehaviourDefault); + var window = Window.Instance; + var view = new MyCustomView("CustomView", CustomViewBehaviour.ViewBehaviourDefault); view.Focusable = true; window.Add(view); FocusManager.Instance.SetCurrentFocusView(view); Assert.AreEqual(true, view.focusGainedFlag, "OnFocusGained Check Fail."); + + await Task.Delay(1000); + + FocusManager.Instance.ClearFocus(); window.Remove(view); } @@ -820,10 +825,12 @@ namespace Tizen.NUI.Tests /* TEST CODE */ try { - MyCustomView View = new MyCustomView("CustomView", CustomViewBehaviour.ViewBehaviourDefault); - PanGesture pan = new PanGesture(); - View.OnPan(pan); - Assert.AreEqual(true, View.panFlag, "OnPan trigger Check Fail."); + var view = new MyCustomView("CustomView", CustomViewBehaviour.ViewBehaviourDefault); + var pan = new PanGesture(); + + view.OnPan(pan); + + Assert.AreEqual(true, view.panFlag, "OnPan trigger Check Fail."); } catch (Exception e) { @@ -840,19 +847,25 @@ namespace Tizen.NUI.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] [Property("AUTHOR", "Wenfeng Ge, wenfeng.ge@samsung.com")] - public void OnPropertySet_CHECK_VALUE() + public async Task OnPropertySet_CHECK_VALUE() { /* TEST CODE */ try { - MyCustomView view = new MyCustomView("CustomView", CustomViewBehaviour.ViewBehaviourDefault); + var view = new MyCustomView("CustomView", CustomViewBehaviour.ViewBehaviourDefault); + + Window.Instance.GetDefaultLayer().Add(view); + + await Task.Delay(1000); + view.Size2D = new Size2D(100, 100); view.Position = new Position(100, 100, 0); view.BackgroundColor = Color.Red; - Window.Instance.GetDefaultLayer().Add(view); view.StyleName = "fake"; - Window.Instance.GetDefaultLayer().Remove(view); + Assert.AreEqual(true, view.propertySetFlag, "OnPropertySet trigger Check Fail."); + + view.Unparent(); } catch (Exception e) { @@ -877,7 +890,7 @@ namespace Tizen.NUI.Tests MyCustomView view = new MyCustomView("CustomView", CustomViewBehaviour.ViewBehaviourDefault); Window window = Window.Instance; window.Add(view); - await Task.Delay(500); + await Task.Delay(1000); Assert.AreEqual(true, view.relayoutFlag, "OnRelayout trigger Check Fail."); window.Remove(view); } @@ -1118,7 +1131,7 @@ namespace Tizen.NUI.Tests public class MyCustomView : CustomView { - View view; + public View view; public bool calculateRelayoutSizeFlag = false; public bool childAddFlag = false; public bool childRemoveFlag = false; @@ -1152,6 +1165,24 @@ namespace Tizen.NUI.Tests CustomViewRegistry.Instance.Register(CreateInstance, typeof(MyCustomView)); } + protected override void Dispose(DisposeTypes type) + { + + if (disposed) + { + return; + } + + tlog.Debug("NUI", $"MyCustomView : Dispose(type={type})!"); + if (view.HasBody()) + { + view.Dispose(); + view = null; + } + + base.Dispose(type); + } + public MyCustomView() : base(typeof(MyCustomView).FullName, CustomViewBehaviour.ViewBehaviourDefault) { } @@ -1192,10 +1223,13 @@ namespace Tizen.NUI.Tests public override void OnInitialize() { - view = new BaseComponents.View(); + view = new Tizen.NUI.BaseComponents.View(); + view.Size2D = new Size2D(200, 200); view.BackgroundColor = Color.Red; + this.Add(view); + } public override void OnLayoutNegotiated(float size, DimensionType dimension) diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPopup.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPopup.cs index ff6505b..9ece376 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPopup.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPopup.cs @@ -9,6 +9,8 @@ using Tizen.NUI.Test; namespace Tizen.NUI.Tests { + using tlog = Tizen.Log; + [TestFixture] [Description("Tizen.NUI.UIComponents.Popup Tests")] public class PopupTests @@ -28,9 +30,9 @@ namespace Tizen.NUI.Tests public void Destroy() { Tizen.Log.Info(TAG, "Destroy() is called!"); - } - - private void OnTouchedOutside(object obj, EventArgs e) + } + + private void OnTouchedOutside(object obj, EventArgs e) { } [Test] @@ -40,21 +42,24 @@ namespace Tizen.NUI.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "CONSTR")] [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - public void Popup_INIT() + public async Task Popup_INIT() { /* TEST CODE */ - var popup = new Popup(); - - Assert.IsNotNull(popup, "Should not be a Null : Popup"); + var popup = new Popup(); + + Assert.IsNotNull(popup, "Should not be a Null : Popup"); Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); - popup.Size2D = new Size2D(100, 100); - - Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); - Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); - + Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); + Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); + Window.Instance.GetDefaultLayer().Add(popup); + + await Task.Delay(3000); + + popup.Size2D = new Size2D(100, 100); + popup.Unparent(); } @@ -70,25 +75,26 @@ namespace Tizen.NUI.Tests /* TEST CODE */ try { - var popup = new Popup(); - - Assert.IsNotNull(popup, "Should not be a Null : Popup"); + var popup = new Popup(); + + Assert.IsNotNull(popup, "Should not be a Null : Popup"); Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); - - var label = new TextLabel("setTitle"); - - Assert.IsNotNull(label, "Should not be a Null : TextLabel"); + + Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); + Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); + + Window.Instance.GetDefaultLayer().Add(popup); + + var label = new TextLabel("setTitle"); + + Assert.IsNotNull(label, "Should not be a Null : TextLabel"); Assert.IsInstanceOf(label, "Should be an instance of : TextLabel"); popup.SetTitle(label); - popup.Size2D = new Size2D(100, 100); - - Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); - Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); - - Window.Instance.GetDefaultLayer().Add(popup); - + popup.Size2D = new Size2D(100, 100); + popup.Unparent(); + } catch (Exception e) { @@ -110,25 +116,26 @@ namespace Tizen.NUI.Tests /* TEST CODE */ try { - var popup = new Popup(); - - Assert.IsNotNull(popup, "Should not be a Null : Popup"); - Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); - - var label = new TextLabel("SetContent"); - - Assert.IsNotNull(label, "Should not be a Null : TextLabel"); - Assert.IsInstanceOf(label, "Should be an instance of : TextLabel"); + var popup = new Popup(); + + Assert.IsNotNull(popup, "Should not be a Null : Popup"); + Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); + + Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); + Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); + + Window.Instance.GetDefaultLayer().Add(popup); + + var label = new TextLabel("SetContent"); + + Assert.IsNotNull(label, "Should not be a Null : TextLabel"); + Assert.IsInstanceOf(label, "Should be an instance of : TextLabel"); popup.SetContent(label); popup.Size2D = new Size2D(100, 100); - - Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); - Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); - - Window.Instance.GetDefaultLayer().Add(popup); popup.Unparent(); + } catch (Exception e) { @@ -150,25 +157,26 @@ namespace Tizen.NUI.Tests /* TEST CODE */ try { - var popup = new Popup(); - - Assert.IsNotNull(popup, "Should not be a Null : Popup"); - Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); - - var label = new TextLabel("SetFooter"); - - Assert.IsNotNull(label, "Should not be a Null : TextLabel"); - Assert.IsInstanceOf(label, "Should be an instance of : TextLabel"); + var popup = new Popup(); + + Assert.IsNotNull(popup, "Should not be a Null : Popup"); + Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); + + Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); + Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); + + Window.Instance.GetDefaultLayer().Add(popup); + + var label = new TextLabel("SetFooter"); + + Assert.IsNotNull(label, "Should not be a Null : TextLabel"); + Assert.IsInstanceOf(label, "Should be an instance of : TextLabel"); popup.SetFooter(label); popup.Size2D = new Size2D(100, 100); - - Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); - Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); - - Window.Instance.GetDefaultLayer().Add(popup); popup.Unparent(); + } catch (Exception e) { @@ -188,48 +196,49 @@ namespace Tizen.NUI.Tests public void Title_SET_GET_VALUE() { /* TEST CODE */ - var popup = new Popup(); - - Assert.IsNotNull(popup, "Should not be a Null : Popup"); - Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); + var popup = new Popup(); + + Assert.IsNotNull(popup, "Should not be a Null : Popup"); + Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); + + Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); + Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); + + Window.Instance.GetDefaultLayer().Add(popup); popup.AnimationDuration = 0.0f; - popup.SetDisplayState(Popup.DisplayStateType.Shown); - - var label = new TextLabel("test title"); - - Assert.IsNotNull(label, "Should not be a Null : TextLabel"); - Assert.IsInstanceOf(label, "Should be an instance of : TextLabel"); - - var map = new PropertyMap(); - - Assert.IsNotNull(map, "Should not be a Null : PropertyMap"); - Assert.IsInstanceOf(map, "Should be an instance of : PropertyMap"); + popup.SetDisplayState(Popup.DisplayStateType.Shown); + + var label = new TextLabel("test title"); + + Assert.IsNotNull(label, "Should not be a Null : TextLabel"); + Assert.IsInstanceOf(label, "Should be an instance of : TextLabel"); + + var map = new PropertyMap(); + + Assert.IsNotNull(map, "Should not be a Null : PropertyMap"); + Assert.IsInstanceOf(map, "Should be an instance of : PropertyMap"); map.Add("type", new PropertyValue(label.GetTypeName())); map.Add("text", new PropertyValue("test title")); - popup.Title = map; + popup.Title = map; var propertyMap = popup.Title; - Assert.IsNotNull(propertyMap, "Can't create successfully : PropertyMap"); - Assert.IsInstanceOf(propertyMap, "Should be an instance of PropertyMap"); + Assert.IsNotNull(propertyMap, "Can't create successfully : PropertyMap"); + Assert.IsInstanceOf(propertyMap, "Should be an instance of PropertyMap"); String type = ""; (propertyMap.Find(0, "type")).Get(out type); Assert.AreEqual("TextLabel", type, "Should be equals to the set value of type"); String text = ""; (propertyMap.Find(1, "text")).Get(out text); - Assert.AreEqual("test title", text, "Should be equals to the set value of text"); - + Assert.AreEqual("test title", text, "Should be equals to the set value of text"); + popup.Size2D = new Size2D(100, 100); - - Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); - Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); - - Window.Instance.GetDefaultLayer().Add(popup); popup.Unparent(); + } [Test] @@ -242,38 +251,38 @@ namespace Tizen.NUI.Tests public void Content_SET_GET_VALUE() { /* TEST CODE */ - var popup = new Popup(); - - Assert.IsNotNull(popup, "Should not be a Null : Popup"); - Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); - - Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); - Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); - - Window.Instance.GetDefaultLayer().Add(popup); - + var popup = new Popup(); + + Assert.IsNotNull(popup, "Should not be a Null : Popup"); + Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); + + Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); + Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); + + Window.Instance.GetDefaultLayer().Add(popup); + popup.Size2D = new Size2D(100, 100); popup.AnimationDuration = 0.0f; popup.SetDisplayState(Popup.DisplayStateType.Shown); - var label = new TextLabel("test title"); - - Assert.IsNotNull(label, "Should not be a Null : TextLabel"); - Assert.IsInstanceOf(label, "Should be an instance of : TextLabel"); + var label = new TextLabel("test title"); + + Assert.IsNotNull(label, "Should not be a Null : TextLabel"); + Assert.IsInstanceOf(label, "Should be an instance of : TextLabel"); var map = new PropertyMap(); - Assert.IsNotNull(map, "Should not be a Null : PropertyMap"); - Assert.IsInstanceOf(map, "Should be an instance of : PropertyMap"); + Assert.IsNotNull(map, "Should not be a Null : PropertyMap"); + Assert.IsInstanceOf(map, "Should be an instance of : PropertyMap"); map.Add("type", new PropertyValue(label.GetTypeName())); map.Add("text", new PropertyValue("test content")); popup.Content = map; - var propertyMap = popup.Content; - - Assert.IsNotNull(propertyMap, "Should not be a Null : PropertyMap"); - Assert.IsInstanceOf(propertyMap, "Should be an instance of : PropertyMap"); + var propertyMap = popup.Content; + + Assert.IsNotNull(propertyMap, "Should not be a Null : PropertyMap"); + Assert.IsInstanceOf(propertyMap, "Should be an instance of : PropertyMap"); String type = ""; (propertyMap.Find(0, "type")).Get(out type); @@ -295,38 +304,38 @@ namespace Tizen.NUI.Tests public void Footer_SET_GET_VALUE() { /* TEST CODE */ - var popup = new Popup(); - - Assert.IsNotNull(popup, "Should not be a Null : Popup"); - Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); - - Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); - Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); + var popup = new Popup(); + + Assert.IsNotNull(popup, "Should not be a Null : Popup"); + Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); + + Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); + Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); - Window.Instance.GetDefaultLayer().Add(popup); + Window.Instance.GetDefaultLayer().Add(popup); popup.Size2D = new Size2D(100, 100); popup.AnimationDuration = 0.0f; popup.SetDisplayState(Popup.DisplayStateType.Shown); - var label = new TextLabel("test title"); - - Assert.IsNotNull(label, "Should not be a Null : TextLabel"); - Assert.IsInstanceOf(label, "Should be an instance of : TextLabel"); + var label = new TextLabel("test title"); + + Assert.IsNotNull(label, "Should not be a Null : TextLabel"); + Assert.IsInstanceOf(label, "Should be an instance of : TextLabel"); var map = new PropertyMap(); - Assert.IsNotNull(map, "Should not be a Null : PropertyMap"); - Assert.IsInstanceOf(map, "Should be an instance of : PropertyMap"); + Assert.IsNotNull(map, "Should not be a Null : PropertyMap"); + Assert.IsInstanceOf(map, "Should be an instance of : PropertyMap"); map.Add("type", new PropertyValue(label.GetTypeName())); map.Add("text", new PropertyValue("test Footer")); popup.Footer = map; - var propertyMap = popup.Footer; - - Assert.IsNotNull(propertyMap, "Should not be a Null : PropertyMap"); - Assert.IsInstanceOf(propertyMap, "Should be an instance of : PropertyMap"); + var propertyMap = popup.Footer; + + Assert.IsNotNull(propertyMap, "Should not be a Null : PropertyMap"); + Assert.IsInstanceOf(propertyMap, "Should be an instance of : PropertyMap"); String type = ""; (propertyMap.Find(0, "type")).Get(out type); @@ -348,60 +357,58 @@ namespace Tizen.NUI.Tests public async Task ExitAnimation_SET_GET_VALUE() { /* TEST CODE */ - var popup = new Popup(); - - Assert.IsNotNull(popup, "Should not be a Null : Popup"); - Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); - - Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); - Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); - - Window.Instance.GetDefaultLayer().Add(popup); - + var popup = new Popup(); + + Assert.IsNotNull(popup, "Should not be a Null : Popup"); + Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); + + Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); + Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); + + Window.Instance.GetDefaultLayer().Add(popup); + popup.Size2D = new Size2D(100, 100); popup.PositionUsesPivotPoint = true; popup.AnimationDuration = 1.0f; popup.AnimationMode = Popup.AnimationModeType.Custom; - var label = new TextLabel("text"); - - Assert.IsNotNull(label, "Should not be a Null : TextLabel"); - Assert.IsInstanceOf(label, "Should be an instance of : TextLabel"); + var label = new TextLabel("text"); + + Assert.IsNotNull(label, "Should not be a Null : TextLabel"); + Assert.IsInstanceOf(label, "Should be an instance of : TextLabel"); popup.SetContent(label); - var animationMapExit = new PropertyMap(); - - Assert.IsNotNull(animationMapExit, "Should not be a Null : PropertyMap"); - Assert.IsInstanceOf(animationMapExit, "Should be an instance of : PropertyMap"); + var animationMapExit = new PropertyMap(); + + Assert.IsNotNull(animationMapExit, "Should not be a Null : PropertyMap"); + Assert.IsInstanceOf(animationMapExit, "Should be an instance of : PropertyMap"); animationMapExit.Insert("actor", new PropertyValue("customAnimationPopup")); - animationMapExit.Insert("property", new PropertyValue("position")); - - var EixAnimationDestination = new Vector3(-300.0f, -200.0f, 0.0f); - - Assert.IsNotNull(EixAnimationDestination, "Should not be a Null : Vector3"); - Assert.IsInstanceOf(EixAnimationDestination, "Should be an instance of : Vector3"); + animationMapExit.Insert("property", new PropertyValue("position")); + + var EixAnimationDestination = new Vector3(-300.0f, -200.0f, 0.0f); + + Assert.IsNotNull(EixAnimationDestination, "Should not be a Null : Vector3"); + Assert.IsInstanceOf(EixAnimationDestination, "Should be an instance of : Vector3"); animationMapExit.Insert("value", new PropertyValue(EixAnimationDestination)); animationMapExit.Insert("alphaFunction", new PropertyValue("EASE_IN")); - var timePeriodMapExit = new PropertyArray(); - - Assert.IsNotNull(timePeriodMapExit, "Should not be a Null : PropertyArray"); - Assert.IsInstanceOf(timePeriodMapExit, "Should be an instance of : PropertyArray"); + var timePeriodMapExit = new PropertyArray(); + + Assert.IsNotNull(timePeriodMapExit, "Should not be a Null : PropertyArray"); + Assert.IsInstanceOf(timePeriodMapExit, "Should be an instance of : PropertyArray"); timePeriodMapExit.PushBack(new PropertyValue(0.0f)); - timePeriodMapExit.PushBack(new PropertyValue(1.0f)); + timePeriodMapExit.PushBack(new PropertyValue(0.2f)); animationMapExit.Insert("timePeriod", new PropertyValue(timePeriodMapExit)); popup.ExitAnimation = animationMapExit; popup.SetDisplayState(Popup.DisplayStateType.Shown); - await Task.Delay(20); - Assert.IsNotNull(popup, "Should not be a Null : Popup"); Assert.IsNotNull(popup.ExitAnimation, "Should not be a Null : Popup.ExitAnimation"); - Assert.IsInstanceOf(popup.ExitAnimation, "Should be an instance of : PropertyMap"); + Assert.IsInstanceOf(popup.ExitAnimation, "Should be an instance of : PropertyMap"); popup.Unparent(); } @@ -416,48 +423,48 @@ namespace Tizen.NUI.Tests public async Task EntryAnimation_SET_GET_VALUE() { /* TEST CODE */ - var popup = new Popup(); - - Assert.IsNotNull(popup, "Should not be a Null : Popup"); - Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); - - Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); - Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); - - Window.Instance.GetDefaultLayer().Add(popup); - + var popup = new Popup(); + + Assert.IsNotNull(popup, "Should not be a Null : Popup"); + Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); + + Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); + Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); + + Window.Instance.GetDefaultLayer().Add(popup); + popup.Size2D = new Size2D(100, 100); popup.PositionUsesPivotPoint = true; popup.AnimationDuration = 1.0f; popup.AnimationMode = Popup.AnimationModeType.Custom; - var label = new TextLabel("text"); - - Assert.IsNotNull(label, "Should not be a Null : TextLabel"); - Assert.IsInstanceOf(label, "Should be an instance of : TextLabel"); + var label = new TextLabel("text"); + + Assert.IsNotNull(label, "Should not be a Null : TextLabel"); + Assert.IsInstanceOf(label, "Should be an instance of : TextLabel"); popup.SetContent(label); - var animationMapEntry = new PropertyMap(); - - Assert.IsNotNull(animationMapEntry, "Should not be a Null : PropertyMap"); - Assert.IsInstanceOf(animationMapEntry, "Should be an instance of : PropertyMap"); + var animationMapEntry = new PropertyMap(); + + Assert.IsNotNull(animationMapEntry, "Should not be a Null : PropertyMap"); + Assert.IsInstanceOf(animationMapEntry, "Should be an instance of : PropertyMap"); animationMapEntry.Insert("actor", new PropertyValue("customAnimationPopup")); animationMapEntry.Insert("property", new PropertyValue("position")); - var entryAnimationDestination = new Vector3(300.0f, 200.0f, 0.0f); - - Assert.IsNotNull(entryAnimationDestination, "Should not be a Null : Vector3"); - Assert.IsInstanceOf(entryAnimationDestination, "Should be an instance of : Vector3"); + var entryAnimationDestination = new Vector3(300.0f, 200.0f, 0.0f); + + Assert.IsNotNull(entryAnimationDestination, "Should not be a Null : Vector3"); + Assert.IsInstanceOf(entryAnimationDestination, "Should be an instance of : Vector3"); animationMapEntry.Insert("value", new PropertyValue(entryAnimationDestination)); animationMapEntry.Insert("alphaFunction", new PropertyValue("EASE_OUT")); - var timePeriodMapEntry = new PropertyArray(); - - Assert.IsNotNull(timePeriodMapEntry, "Should not be a Null : PropertyArray"); - Assert.IsInstanceOf(timePeriodMapEntry, "Should be an instance of : PropertyArray"); + var timePeriodMapEntry = new PropertyArray(); + + Assert.IsNotNull(timePeriodMapEntry, "Should not be a Null : PropertyArray"); + Assert.IsInstanceOf(timePeriodMapEntry, "Should be an instance of : PropertyArray"); timePeriodMapEntry.PushBack(new PropertyValue(0.0f)); timePeriodMapEntry.PushBack(new PropertyValue(1.0f)); @@ -485,15 +492,15 @@ namespace Tizen.NUI.Tests /* TEST CODE */ try { - var popup = new Popup(); - - Assert.IsNotNull(popup, "Should not be a Null : Popup"); - Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); - - Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); - Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); + var popup = new Popup(); + + Assert.IsNotNull(popup, "Should not be a Null : Popup"); + Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); + + Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); + Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); - Window.Instance.GetDefaultLayer().Add(popup); + Window.Instance.GetDefaultLayer().Add(popup); popup.Size2D = new Size2D(100, 100); popup.AnimationDuration = 0.0f; @@ -522,34 +529,34 @@ namespace Tizen.NUI.Tests public async Task Shown_CHECK_STATE() { /* TEST CODE */ - var popup = new Popup(); - - Assert.IsNotNull(popup, "Should not be a Null : Popup"); - Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); - - Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); - Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); - - Window.Instance.GetDefaultLayer().Add(popup); - + var popup = new Popup(); + + Assert.IsNotNull(popup, "Should not be a Null : Popup"); + Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); + + Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); + Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); + + Window.Instance.GetDefaultLayer().Add(popup); + popup.Size2D = new Size2D(100, 100); popup.AnimationDuration = 0.0f; - flag = false; - popup.Shown += Popup_Shown; + flag = false; + popup.Shown += Popup_Shown; popup.SetDisplayState(Popup.DisplayStateType.Shown); await Task.Delay(120); Assert.IsTrue(flag, "Shown Should be triggered!"); popup.Shown -= Popup_Shown; popup.Unparent(); - } - - private void Popup_Shown(object sender, Popup.ShownEventArgs e) - { - flag = true; - } - + } + + private void Popup_Shown(object sender, Popup.ShownEventArgs e) + { + flag = true; + } + bool flag = false; [Test] [Category("P1")] @@ -561,15 +568,15 @@ namespace Tizen.NUI.Tests public void Showing_CHECK_STATE() { /* TEST CODE */ - var popup = new Popup(); - - Assert.IsNotNull(popup, "Should not be a Null : Popup"); - Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); + var popup = new Popup(); - Window.Instance.GetDefaultLayer().Add(popup); - - Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); - Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); + Assert.IsNotNull(popup, "Should not be a Null : Popup"); + Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); + + Window.Instance.GetDefaultLayer().Add(popup); + + Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); + Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); popup.Size2D = new Size2D(100, 100); @@ -582,13 +589,13 @@ namespace Tizen.NUI.Tests popup.Showing -= Popup_Showing; popup.Unparent(); - } - - private void Popup_Showing(object sender, Popup.ShowingEventArgs e) - { - flag = true; - } - + } + + private void Popup_Showing(object sender, Popup.ShowingEventArgs e) + { + flag = true; + } + [Test] [Category("P1")] [Description("Test Hidden.Check whether Hidden will be triggered successfully")] @@ -599,22 +606,22 @@ namespace Tizen.NUI.Tests public async Task Hidden_CHECK_STATE() { /* TEST CODE */ - var popup = new Popup(); - - Assert.IsNotNull(popup, "Should not be a Null : Popup"); - Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); + var popup = new Popup(); + + Assert.IsNotNull(popup, "Should not be a Null : Popup"); + Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); popup.AnimationDuration = 0.1f; - flag = false; - popup.Hidden += Popup_Hidden; + flag = false; + popup.Hidden += Popup_Hidden; popup.SetDisplayState(Popup.DisplayStateType.Shown); - popup.Size2D = new Size2D(100, 100); - - Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); - Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); - - Window.Instance.GetDefaultLayer().Add(popup); - + popup.Size2D = new Size2D(100, 100); + + Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); + Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); + + Window.Instance.GetDefaultLayer().Add(popup); + await Task.Delay(1200); popup.SetDisplayState(Popup.DisplayStateType.Hidden); await Task.Delay(1200); @@ -622,13 +629,13 @@ namespace Tizen.NUI.Tests popup.Hidden -= Popup_Hidden; popup.Unparent(); - } - - private void Popup_Hidden(object sender, Popup.HiddenEventArgs e) - { - flag = true; - } - + } + + private void Popup_Hidden(object sender, Popup.HiddenEventArgs e) + { + flag = true; + } + [Test] [Category("P1")] [Description("Test Hiding.Check whether Hiding will be triggered successfully")] @@ -639,22 +646,22 @@ namespace Tizen.NUI.Tests public void Hiding_CHECK_STATE() { /* TEST CODE */ - var popup = new Popup(); - - Assert.IsNotNull(popup, "Should not be a Null : Popup"); - Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); + var popup = new Popup(); + + Assert.IsNotNull(popup, "Should not be a Null : Popup"); + Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); popup.AnimationDuration = 0.1f; - flag = false; - popup.Hiding += Popup_Hiding; - - popup.Size2D = new Size2D(100, 100); - - Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); - Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); - - Window.Instance.GetDefaultLayer().Add(popup); - + flag = false; + popup.Hiding += Popup_Hiding; + + popup.Size2D = new Size2D(100, 100); + + Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); + Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); + + Window.Instance.GetDefaultLayer().Add(popup); + popup.SetDisplayState(Popup.DisplayStateType.Shown); popup.SetDisplayState(Popup.DisplayStateType.Hidden); @@ -663,13 +670,13 @@ namespace Tizen.NUI.Tests popup.Hide(); popup.Hiding -= Popup_Hiding; popup.Unparent(); - } - - private void Popup_Hiding(object sender, Popup.HidingEventArgs e) - { - flag = true; - } - + } + + private void Popup_Hiding(object sender, Popup.HidingEventArgs e) + { + flag = true; + } + [Test] [Category("P1")] [Description("Test DisplayState.Check whether DisplayState is readable and writeable.")] @@ -680,31 +687,31 @@ namespace Tizen.NUI.Tests public async Task DisplayState_SET_GET_VALUE() { /* TEST CODE */ - var popup = new Popup(); - - Assert.IsNotNull(popup, "Should not be a Null : Popup"); - Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); + var popup = new Popup(); + + Assert.IsNotNull(popup, "Should not be a Null : Popup"); + Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); popup.AnimationDuration = 0.5f; popup.DisplayState = Popup.DisplayStateType.Shown; - popup.Size2D = new Size2D(100, 100); - - Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); - Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); - - Window.Instance.GetDefaultLayer().Add(popup); - - Assert.AreEqual(Popup.DisplayStateType.Showing, popup.DisplayState, "Should be equals to the set value of DisplayState"); - - await Task.Delay(1000); - - Assert.AreEqual(Popup.DisplayStateType.Shown, popup.DisplayState, "Should be equals to the set value of DisplayState"); - - popup.DisplayState = Popup.DisplayStateType.Hidden; - - Assert.AreEqual(Popup.DisplayStateType.Hiding, popup.DisplayState, "Should be equals to the set value of DisplayState"); - - await Task.Delay(1000); + popup.Size2D = new Size2D(100, 100); + + Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); + Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); + + Window.Instance.GetDefaultLayer().Add(popup); + + Assert.AreEqual(Popup.DisplayStateType.Showing, popup.DisplayState, "Should be equals to the set value of DisplayState"); + + await Task.Delay(1000); + + Assert.AreEqual(Popup.DisplayStateType.Shown, popup.DisplayState, "Should be equals to the set value of DisplayState"); + + popup.DisplayState = Popup.DisplayStateType.Hidden; + + Assert.AreEqual(Popup.DisplayStateType.Hiding, popup.DisplayState, "Should be equals to the set value of DisplayState"); + + await Task.Delay(1000); Assert.AreEqual(Popup.DisplayStateType.Hidden, popup.DisplayState, "Should be equals to the set value of DisplayState"); @@ -721,23 +728,23 @@ namespace Tizen.NUI.Tests public void TouchTransparent_SET_GET_VALUE() { /* TEST CODE */ - var popup = new Popup(); - - Assert.IsNotNull(popup, "Should not be a Null : Popup"); - Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); + var popup = new Popup(); + + Assert.IsNotNull(popup, "Should not be a Null : Popup"); + Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); popup.TouchTransparent = true; - popup.Size2D = new Size2D(100, 100); - - Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); - Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); - - Window.Instance.GetDefaultLayer().Add(popup); - - Assert.AreEqual(true, popup.TouchTransparent, "Should be equals to the set value of TouchTransparent"); - + popup.Size2D = new Size2D(100, 100); + + Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); + Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); + + Window.Instance.GetDefaultLayer().Add(popup); + + Assert.AreEqual(true, popup.TouchTransparent, "Should be equals to the set value of TouchTransparent"); + popup.TouchTransparent = false; - Assert.AreEqual(false, popup.TouchTransparent, "Should be equals to the set value of TouchTransparent"); + Assert.AreEqual(false, popup.TouchTransparent, "Should be equals to the set value of TouchTransparent"); popup.Unparent(); } @@ -752,21 +759,21 @@ namespace Tizen.NUI.Tests public void TailVisibility_SET_GET_VALUE() { /* TEST CODE */ - var popup = new Popup(); - - Assert.IsNotNull(popup, "Should not be a Null : Popup"); - Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); - - popup.Size2D = new Size2D(100, 100); - - Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); - Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); - - Window.Instance.GetDefaultLayer().Add(popup); - + var popup = new Popup(); + + Assert.IsNotNull(popup, "Should not be a Null : Popup"); + Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); + + popup.Size2D = new Size2D(100, 100); + + Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); + Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); + + Window.Instance.GetDefaultLayer().Add(popup); + popup.TailVisibility = true; - Assert.AreEqual(true, popup.TailVisibility, "Should be equals to the set value of TailVisibility"); - + Assert.AreEqual(true, popup.TailVisibility, "Should be equals to the set value of TailVisibility"); + popup.TailVisibility = false; Assert.AreEqual(false, popup.TailVisibility, "Should be equals to the set value of TailVisibility"); @@ -783,22 +790,22 @@ namespace Tizen.NUI.Tests public void TailPosition_SET_GET_VALUE() { /* TEST CODE */ - var popup = new Popup(); - - Assert.IsNotNull(popup, "Should not be a Null : Popup"); - Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); + var popup = new Popup(); + + Assert.IsNotNull(popup, "Should not be a Null : Popup"); + Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); var vector3 = new Vector3(10.0f, 20.0f, 30.0f); - Assert.IsNotNull(vector3, "Should not be a Null : Vector3"); - Assert.IsInstanceOf(vector3, "Should be an instance of : Vector3"); + Assert.IsNotNull(vector3, "Should not be a Null : Vector3"); + Assert.IsInstanceOf(vector3, "Should be an instance of : Vector3"); popup.TailPosition = vector3; - popup.Size2D = new Size2D(100, 100); - - Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); - Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); - + popup.Size2D = new Size2D(100, 100); + + Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); + Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); + Window.Instance.GetDefaultLayer().Add(popup); Assert.AreEqual(vector3.X, popup.TailPosition.X, "Should be equals to the set value of TailPosition.X"); @@ -818,33 +825,33 @@ namespace Tizen.NUI.Tests public void ContextualMode_SET_GET_VALUE() { /* TEST CODE */ - var popup = new Popup(); - - Assert.IsNotNull(popup, "Should not be a Null : Popup"); - Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); + var popup = new Popup(); + + Assert.IsNotNull(popup, "Should not be a Null : Popup"); + Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); popup.ContextualMode = Popup.ContextualModeType.NonContextual; - popup.Size2D = new Size2D(100, 100); - - Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); - Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); - - Window.Instance.GetDefaultLayer().Add(popup); - - Assert.AreEqual(Popup.ContextualModeType.NonContextual, popup.ContextualMode, "Should be equals to the set value of ContextualMode"); - + popup.Size2D = new Size2D(100, 100); + + Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); + Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); + + Window.Instance.GetDefaultLayer().Add(popup); + + Assert.AreEqual(Popup.ContextualModeType.NonContextual, popup.ContextualMode, "Should be equals to the set value of ContextualMode"); + popup.ContextualMode = Popup.ContextualModeType.Above; - Assert.AreEqual(Popup.ContextualModeType.Above, popup.ContextualMode, "Should be equals to the set value of ContextualMode"); - - //Misspelling, will be fixed later by ACR. + Assert.AreEqual(Popup.ContextualModeType.Above, popup.ContextualMode, "Should be equals to the set value of ContextualMode"); + + //Misspelling, will be fixed later by ACR. popup.ContextualMode = Popup.ContextualModeType.Rright; - Assert.AreEqual(Popup.ContextualModeType.Rright, popup.ContextualMode, "Should be equals to the set value of ContextualMode"); - + Assert.AreEqual(Popup.ContextualModeType.Rright, popup.ContextualMode, "Should be equals to the set value of ContextualMode"); + popup.ContextualMode = Popup.ContextualModeType.Below; - Assert.AreEqual(Popup.ContextualModeType.Below, popup.ContextualMode, "Should be equals to the set value of ContextualMode"); - + Assert.AreEqual(Popup.ContextualModeType.Below, popup.ContextualMode, "Should be equals to the set value of ContextualMode"); + popup.ContextualMode = Popup.ContextualModeType.Left; - Assert.AreEqual(Popup.ContextualModeType.Left, popup.ContextualMode, "Should be equals to the set value of ContextualMode"); + Assert.AreEqual(Popup.ContextualModeType.Left, popup.ContextualMode, "Should be equals to the set value of ContextualMode"); popup.Unparent(); } @@ -859,18 +866,18 @@ namespace Tizen.NUI.Tests public void AnimationDuration_SET_GET_VALUE() { /* TEST CODE */ - var popup = new Popup(); - - Assert.IsNotNull(popup, "Should not be a Null : Popup"); - Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); + var popup = new Popup(); + + Assert.IsNotNull(popup, "Should not be a Null : Popup"); + Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); popup.AnimationDuration = 0.6f; - popup.Size2D = new Size2D(100, 100); - - Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); - Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); - - Window.Instance.GetDefaultLayer().Add(popup); + popup.Size2D = new Size2D(100, 100); + + Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); + Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); + + Window.Instance.GetDefaultLayer().Add(popup); Assert.AreEqual(0.6f, popup.AnimationDuration, "Should be equals to the set value of AnimationDuration"); @@ -887,29 +894,29 @@ namespace Tizen.NUI.Tests public void AnimationMode_SET_GET_VALUE() { /* TEST CODE */ - var popup = new Popup(); - - Assert.IsNotNull(popup, "Should not be a Null : Popup"); - Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); + var popup = new Popup(); + + Assert.IsNotNull(popup, "Should not be a Null : Popup"); + Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); popup.AnimationMode = Popup.AnimationModeType.Custom; - popup.Size2D = new Size2D(100, 100); - - Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); - Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); - - Window.Instance.GetDefaultLayer().Add(popup); - - Assert.AreEqual(Popup.AnimationModeType.Custom, popup.AnimationMode, "Should be equals to the set value of AnimationMode"); - + popup.Size2D = new Size2D(100, 100); + + Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); + Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); + + Window.Instance.GetDefaultLayer().Add(popup); + + Assert.AreEqual(Popup.AnimationModeType.Custom, popup.AnimationMode, "Should be equals to the set value of AnimationMode"); + popup.AnimationMode = Popup.AnimationModeType.None; - Assert.AreEqual(Popup.AnimationModeType.None, popup.AnimationMode, "Should be equals to the set value of AnimationMode"); - + Assert.AreEqual(Popup.AnimationModeType.None, popup.AnimationMode, "Should be equals to the set value of AnimationMode"); + popup.AnimationMode = Popup.AnimationModeType.Zoom; - Assert.AreEqual(Popup.AnimationModeType.Zoom, popup.AnimationMode, "Should be equals to the set value of AnimationMode"); - + Assert.AreEqual(Popup.AnimationModeType.Zoom, popup.AnimationMode, "Should be equals to the set value of AnimationMode"); + popup.AnimationMode = Popup.AnimationModeType.Fade; - Assert.AreEqual(Popup.AnimationModeType.Fade, popup.AnimationMode, "Should be equals to the set value of AnimationMode"); + Assert.AreEqual(Popup.AnimationModeType.Fade, popup.AnimationMode, "Should be equals to the set value of AnimationMode"); popup.Unparent(); } @@ -924,19 +931,19 @@ namespace Tizen.NUI.Tests public void AutoHideDelay_SET_GET_VALUE() { /* TEST CODE */ - var popup = new Popup(); - - Assert.IsNotNull(popup, "Should not be a Null : Popup"); - Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); + var popup = new Popup(); + + Assert.IsNotNull(popup, "Should not be a Null : Popup"); + Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); popup.AutoHideDelay = 10; - popup.Size2D = new Size2D(100, 100); - - Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); - Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); - - Window.Instance.GetDefaultLayer().Add(popup); - + popup.Size2D = new Size2D(100, 100); + + Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); + Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); + + Window.Instance.GetDefaultLayer().Add(popup); + Assert.AreEqual(10, popup.AutoHideDelay, "Should be equals to the set value of AutoHideDelay"); popup.Unparent(); @@ -952,23 +959,23 @@ namespace Tizen.NUI.Tests public void BackingEnabled_SET_GET_VALUE() { /* TEST CODE */ - var popup = new Popup(); - - Assert.IsNotNull(popup, "Should not be a Null : Popup"); - Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); + var popup = new Popup(); + + Assert.IsNotNull(popup, "Should not be a Null : Popup"); + Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); popup.BackingEnabled = true; - popup.Size2D = new Size2D(100, 100); - - Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); - Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); - - Window.Instance.GetDefaultLayer().Add(popup); - - Assert.AreEqual(true, popup.BackingEnabled, "Should be equals to the set value of BackingEnabled"); - + popup.Size2D = new Size2D(100, 100); + + Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); + Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); + + Window.Instance.GetDefaultLayer().Add(popup); + + Assert.AreEqual(true, popup.BackingEnabled, "Should be equals to the set value of BackingEnabled"); + popup.BackingEnabled = false; - Assert.AreEqual(false, popup.BackingEnabled, "Should be equals to the set value of BackingEnabled"); + Assert.AreEqual(false, popup.BackingEnabled, "Should be equals to the set value of BackingEnabled"); popup.Unparent(); } @@ -983,24 +990,24 @@ namespace Tizen.NUI.Tests public void BackingColor_SET_GET_VALUE() { /* TEST CODE */ - var popup = new Popup(); - - Assert.IsNotNull(popup, "Should not be a Null : Popup"); - Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); + var popup = new Popup(); + + Assert.IsNotNull(popup, "Should not be a Null : Popup"); + Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); + + var color = new Vector4(1.0f, 1.0f, 0.0f, 0.0f); - var color = new Vector4(1.0f, 1.0f, 0.0f, 0.0f); - - Assert.IsNotNull(color, "Should not be a Null : Vector4"); - Assert.IsInstanceOf(color, "Should be an instance of : Vector4"); + Assert.IsNotNull(color, "Should not be a Null : Vector4"); + Assert.IsInstanceOf(color, "Should be an instance of : Vector4"); popup.BackingColor = color; - popup.Size2D = new Size2D(100, 100); - - Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); - Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); - - Window.Instance.GetDefaultLayer().Add(popup); - + popup.Size2D = new Size2D(100, 100); + + Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); + Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); + + Window.Instance.GetDefaultLayer().Add(popup); + Assert.AreEqual(color.R, popup.BackingColor.R, "Should be equals to the set value of BackingColor.R"); Assert.AreEqual(color.G, popup.BackingColor.G, "Should be equals to the set value of BackingColor.G"); Assert.AreEqual(color.B, popup.BackingColor.B, "Should be equals to the set value of BackingColor.B"); @@ -1019,25 +1026,25 @@ namespace Tizen.NUI.Tests public void PopupBackgroundImage_SET_GET_VALUE() { /* TEST CODE */ - var popup = new Popup(); - - Assert.IsNotNull(popup, "Should not be a Null : Popup"); - Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); + var popup = new Popup(); - var imageView = new ImageView(image_path); - - Assert.IsNotNull(imageView, "Should not be a Null : ImageView"); - Assert.IsInstanceOf(imageView, "Should be an instance of : ImageView"); + Assert.IsNotNull(popup, "Should not be a Null : Popup"); + Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); + + var imageView = new ImageView(image_path); + + Assert.IsNotNull(imageView, "Should not be a Null : ImageView"); + Assert.IsInstanceOf(imageView, "Should be an instance of : ImageView"); string imageString = imageView.ResourceUrl; popup.PopupBackgroundImage = imageString; - popup.Size2D = new Size2D(100, 100); - - Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); - Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); - - Window.Instance.GetDefaultLayer().Add(popup); - + popup.Size2D = new Size2D(100, 100); + + Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); + Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); + + Window.Instance.GetDefaultLayer().Add(popup); + Assert.AreEqual(imageString, popup.PopupBackgroundImage, "Should be equals to the set value of PopupBackgroundImage"); popup.Unparent(); @@ -1053,24 +1060,24 @@ namespace Tizen.NUI.Tests public void PopupBackgroundBorder_SET_GET_VALUE() { /* TEST CODE */ - var popup = new Popup(); - - Assert.IsNotNull(popup, "Should not be a Null : Popup"); - Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); + var popup = new Popup(); + + Assert.IsNotNull(popup, "Should not be a Null : Popup"); + Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); + + var boreder = new Rectangle(1, 1, 0, 0); - var boreder = new Rectangle(1, 1, 0, 0); - - Assert.IsNotNull(boreder, "Should not be a Null : Rectangle"); - Assert.IsInstanceOf(boreder, "Should be an instance of : Rectangle"); + Assert.IsNotNull(boreder, "Should not be a Null : Rectangle"); + Assert.IsInstanceOf(boreder, "Should be an instance of : Rectangle"); popup.PopupBackgroundBorder = boreder; - popup.Size2D = new Size2D(100, 100); - - Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); - Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); - - Window.Instance.GetDefaultLayer().Add(popup); - + popup.Size2D = new Size2D(100, 100); + + Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); + Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); + + Window.Instance.GetDefaultLayer().Add(popup); + Assert.AreEqual(1, popup.PopupBackgroundBorder.X, "Should be equals to the set value of PopupBackgroundBorder.x"); Assert.AreEqual(1, popup.PopupBackgroundBorder.Y, "Should be equals to the set value of PopupBackgroundBorder.y"); Assert.AreEqual(0, popup.PopupBackgroundBorder.Width, "Should be equals to the set value of PopupBackgroundBorder.width"); @@ -1089,25 +1096,25 @@ namespace Tizen.NUI.Tests public void TailUpImage_SET_GET_VALUE() { /* TEST CODE */ - var popup = new Popup(); - - Assert.IsNotNull(popup, "Should not be a Null : Popup"); - Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); - - var imageView = new ImageView(image_path); - - Assert.IsNotNull(imageView, "Should not be a Null : ImageView"); - Assert.IsInstanceOf(imageView, "Should be an instance of : ImageView"); + var popup = new Popup(); + + Assert.IsNotNull(popup, "Should not be a Null : Popup"); + Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); + + var imageView = new ImageView(image_path); + + Assert.IsNotNull(imageView, "Should not be a Null : ImageView"); + Assert.IsInstanceOf(imageView, "Should be an instance of : ImageView"); string imageString = imageView.ResourceUrl; popup.TailUpImage = imageString; - popup.Size2D = new Size2D(100, 100); - - Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); - Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); - - Window.Instance.GetDefaultLayer().Add(popup); - + popup.Size2D = new Size2D(100, 100); + + Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); + Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); + + Window.Instance.GetDefaultLayer().Add(popup); + Assert.AreEqual(imageString, popup.TailUpImage, "Should be equals to the set value of TailUpImage"); popup.Unparent(); @@ -1123,25 +1130,25 @@ namespace Tizen.NUI.Tests public void TailDownImage_SET_GET_VALUE() { /* TEST CODE */ - var popup = new Popup(); - - Assert.IsNotNull(popup, "Should not be a Null : Popup"); - Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); + var popup = new Popup(); + + Assert.IsNotNull(popup, "Should not be a Null : Popup"); + Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); var imageView = new ImageView(image_path); - Assert.IsNotNull(imageView, "Should not be a Null : ImageView"); - Assert.IsInstanceOf(imageView, "Should be an instance of : ImageView"); + Assert.IsNotNull(imageView, "Should not be a Null : ImageView"); + Assert.IsInstanceOf(imageView, "Should be an instance of : ImageView"); string imageString = imageView.ResourceUrl; popup.TailDownImage = imageString; - popup.Size2D = new Size2D(100, 100); - - Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); - Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); - - Window.Instance.GetDefaultLayer().Add(popup); - + popup.Size2D = new Size2D(100, 100); + + Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); + Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); + + Window.Instance.GetDefaultLayer().Add(popup); + Assert.AreEqual(imageString, popup.TailDownImage, "Should be equals to the set value of TailDownImage"); popup.Unparent(); @@ -1157,25 +1164,25 @@ namespace Tizen.NUI.Tests public void TailLeftImage_SET_GET_VALUE() { /* TEST CODE */ - var popup = new Popup(); - - Assert.IsNotNull(popup, "Should not be a Null : Popup"); - Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); + var popup = new Popup(); + + Assert.IsNotNull(popup, "Should not be a Null : Popup"); + Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); var imageView = new ImageView(image_path); - Assert.IsNotNull(imageView, "Should not be a Null : ImageView"); - Assert.IsInstanceOf(imageView, "Should be an instance of : ImageView"); + Assert.IsNotNull(imageView, "Should not be a Null : ImageView"); + Assert.IsInstanceOf(imageView, "Should be an instance of : ImageView"); string imageString = imageView.ResourceUrl; popup.TailLeftImage = imageString; - popup.Size2D = new Size2D(100, 100); - - Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); - Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); - - Window.Instance.GetDefaultLayer().Add(popup); - + popup.Size2D = new Size2D(100, 100); + + Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); + Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); + + Window.Instance.GetDefaultLayer().Add(popup); + Assert.AreEqual(imageString, popup.TailLeftImage, "Should be equals to the set value of TailLeftImage"); popup.Unparent(); @@ -1191,25 +1198,25 @@ namespace Tizen.NUI.Tests public void TailRightImage_SET_GET_VALUE() { /* TEST CODE */ - var popup = new Popup(); - - Assert.IsNotNull(popup, "Should not be a Null : Popup"); - Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); + var popup = new Popup(); + + Assert.IsNotNull(popup, "Should not be a Null : Popup"); + Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); + + var imageView = new ImageView(image_path); - var imageView = new ImageView(image_path); - - Assert.IsNotNull(imageView, "Should not be a Null : ImageView"); - Assert.IsInstanceOf(imageView, "Should be an instance of : ImageView"); + Assert.IsNotNull(imageView, "Should not be a Null : ImageView"); + Assert.IsInstanceOf(imageView, "Should be an instance of : ImageView"); string imageString = imageView.ResourceUrl; popup.TailRightImage = imageString; - popup.Size2D = new Size2D(100, 100); - - Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); - Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); - - Window.Instance.GetDefaultLayer().Add(popup); - + popup.Size2D = new Size2D(100, 100); + + Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); + Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); + + Window.Instance.GetDefaultLayer().Add(popup); + Assert.AreEqual(imageString, popup.TailRightImage, "Should be equals to the set value of TailRightImage"); popup.Unparent(); @@ -1227,18 +1234,18 @@ namespace Tizen.NUI.Tests /* TEST CODE */ try { - var popup = new Popup(); - - Assert.IsNotNull(popup, "Should not be a Null : Popup"); - Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); - - popup.Size2D = new Size2D(100, 100); - - Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); - Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); - - Window.Instance.Add(popup); - + var popup = new Popup(); + + Assert.IsNotNull(popup, "Should not be a Null : Popup"); + Assert.IsInstanceOf(popup, "Should be an instance of : Popup"); + + popup.Size2D = new Size2D(100, 100); + + Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); + Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); + + Window.Instance.Add(popup); + popup.Unparent(); popup.Dispose(); } diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSProgressBar.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSProgressBar.cs index 1d97355..cccb061 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSProgressBar.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSProgressBar.cs @@ -9,6 +9,8 @@ using Tizen.NUI.Test; namespace Tizen.NUI.Tests { + using tlog = Tizen.Log; + [TestFixture] [Description("Tizen.NUI.UIComponents.ProgressBar Tests")] public class ProgressBarTests @@ -37,20 +39,24 @@ namespace Tizen.NUI.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "CONSTR")] [Property("AUTHOR", "Xuemei Chen, xnicole.chen@samsung.com")] - public void ProgressBar_INIT() + public async Task ProgressBar_INIT() { var progress = new ProgressBar(); + Assert.IsNotNull(progress, "Should not be a Null : ProgressBar"); Assert.IsInstanceOf(progress, "Progress Contruct Fail"); + Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); + Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); + + Window.Instance.GetDefaultLayer().Add(progress); + progress.Size2D = new Size2D(100, 100); - - Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); - Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); - - Window.Instance.GetDefaultLayer().Add(progress); + + await Task.Delay(1000); progress.Unparent(); + } [Test] @@ -60,20 +66,24 @@ namespace Tizen.NUI.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "Xuemei Chen, xnicole.chen@samsung.com")] - public void ProgressValue_SET_GET_VALUE() + public async Task ProgressValue_SET_GET_VALUE() { - ProgressBar progress = new ProgressBar(); + var progress = new ProgressBar(); + + Window.Instance.GetDefaultLayer().Add(progress); + progress.ParentOrigin = ParentOrigin.TopLeft; progress.PivotPoint = PivotPoint.TopLeft; progress.Size = new Size(Window.Instance.Size.Width, 20.0f, 0.0f); progress.Position = new Position(0.0f, 0.0f, 0.0f); progress.BackgroundColor = new Color(255,0,0,255); + progress.ProgressValue = 0.03f; - Window.Instance.GetDefaultLayer().Add(progress); - progress.ProgressValue = 0.03f; + await Task.Delay(1000); Assert.AreEqual(0.03f, progress.ProgressValue, "ProgressValue test Fail "); - Window.Instance.GetDefaultLayer().Remove(progress); + progress.Unparent(); + } [Test] @@ -85,20 +95,21 @@ namespace Tizen.NUI.Tests [Property("AUTHOR", "Xuemei Chen, xnicole.chen@samsung.com")] public async Task SecondaryProgressValue_SET_GET_VALUE() { - ProgressBar progress = new ProgressBar(); + var progress = new ProgressBar(); + + Window.Instance.GetDefaultLayer().Add(progress); progress.ParentOrigin = ParentOrigin.TopLeft; progress.PivotPoint = PivotPoint.TopLeft; progress.Size = new Size(Window.Instance.Size.Width, 20.0f, 0.0f); progress.Position = new Position(0.0f, 20.0f, 0.0f); progress.BackgroundColor = new Color(0, 255, 0, 255); - - Window.Instance.GetDefaultLayer().Add(progress); progress.SecondaryProgressValue = 0.04f; - await Task.Delay(2000); + await Task.Delay(1000); float secondvalue = progress.SecondaryProgressValue; Assert.AreEqual(0.04f, secondvalue, "Secondary ProgressValue test Fail"); - Window.Instance.GetDefaultLayer().Remove(progress); + progress.Unparent(); + } [Test] @@ -110,7 +121,7 @@ namespace Tizen.NUI.Tests [Property("AUTHOR", "Xuemei Chen, xnicole.chen@samsung.com")] public async Task Indeterminate_SET_GET_VALUE() { - ProgressBar progress = new ProgressBar(); + var progress = new ProgressBar(); progress.ParentOrigin = ParentOrigin.TopLeft; progress.PivotPoint = PivotPoint.TopLeft; progress.Size = new Size(Window.Instance.Size.Width, 20.0f, 0.0f); @@ -153,6 +164,10 @@ namespace Tizen.NUI.Tests Assert.IsNotNull(value, "Property Value is NUll."); value.Get(out url); Assert.AreEqual(image_path, url, "URL IS NOT RIGHT."); + + map.Clear(); + progress.TrackVisual = map; + Window.Instance.GetDefaultLayer().Remove(progress); } @@ -175,6 +190,9 @@ namespace Tizen.NUI.Tests Assert.IsNotNull(value, "Property Value is NUll."); value.Get(out url); Assert.AreEqual(image_path, url, "URL IS NOT RIGHT."); + + map.Clear(); + progress.SecondaryProgressVisual = map; } [Test] @@ -207,6 +225,10 @@ namespace Tizen.NUI.Tests Assert.IsNotNull(pvalue, "RETURN IS NULL 2"); pvalue.Get(out url); Assert.AreEqual(image_path, url, "URL IS NOT RIGHT."); + + map.Clear(); + progress.ProgressVisual = map; + Window.Instance.GetDefaultLayer().Remove(progress); } @@ -231,6 +253,9 @@ namespace Tizen.NUI.Tests Assert.IsNotNull(pValue, "RETURN IS NULL 2"); pValue.Get(out url); Assert.AreEqual(image_path, url, "URL IS NOT RIGHT."); + + map.Clear(); + progress.IndeterminateVisual = map; } [Test] @@ -258,6 +283,10 @@ namespace Tizen.NUI.Tests String text = ""; (progress.LabelVisual.Find(TextVisualProperty.Text)).Get(out text); Assert.AreEqual("0.5 / 0.61", text, "SelectedStateImage does not work well here!"); + + map.Clear(); + progress.LabelVisual = map; + } [Test] @@ -285,6 +314,9 @@ namespace Tizen.NUI.Tests transitionMap.PushBack(new PropertyValue(animatorMap)); progress.IndeterminateVisualAnimation = transitionMap; + + transitionMap.Clear(); + progress.IndeterminateVisualAnimation = transitionMap; } [Test] -- 2.7.4