From: zhangzg Date: Wed, 4 Mar 2020 04:21:42 +0000 (+0900) Subject: [ACR-280][NUI][Remove TCs for deprecate APIs] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bd36bf20d07d3be1a1c9620e8e297c9ac407da3d;p=test%2Ftct%2Fcsharp%2Fapi.git [ACR-280][NUI][Remove TCs for deprecate APIs] Change-Id: I61efd74866610fba53a2bd8af52bc0638618aee3 --- diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSButton.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSButton.cs deleted file mode 100755 index 29669d0..0000000 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSButton.cs +++ /dev/null @@ -1,503 +0,0 @@ -using NUnit.Framework; -using NUnit.Framework.TUnit; -using System; -using Tizen.NUI; -using Tizen.NUI.UIComponents; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using Tizen.NUI.Test; - -namespace Tizen.NUI.Tests -{ - [TestFixture] - [Description("Tizen.NUI.UIComponents.Button Tests")] - public class ButtonTests - { - private string TAG = "NUI"; - private string image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png"; - - [SetUp] - public void Init() - { - Tizen.Log.Info(TAG, "Init() is called!"); - App.MainTitleChangeText("ButtonTests"); - App.MainTitleChangeBackgroundColor(null); - - } - - [TearDown] - public void Destroy() - { - Tizen.Log.Info(TAG, "Destroy() is called!"); - } - - [Test] - [Category("P1")] - [Description("Test ForegroundVisualPadding.Check whether ForegroundVisualPadding is readable and writable.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Button.ForegroundVisualPadding A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - public void ForegroundVisualPadding_SET_GET_VALUE() - { - /* TEST CODE */ - Button button = new PushButton(); - button.ForegroundVisualPadding = new Vector4(0, 0, 0, 0); - Vector4 vector = button.ForegroundVisualPadding; - Assert.AreEqual(0, vector.X, "Should be equals to the value set"); - Assert.AreEqual(0, vector.Y, "Should be equals to the value set"); - Assert.AreEqual(0, vector.Z, "Should be equals to the value set"); - Assert.AreEqual(0, vector.W, "Should be equals to the value set"); - } - - - [Test] - [Category("P1")] - [Description("Test UnselectedVisual.Check whether UnselectedVisual is readable and writable.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Button.UnselectedVisual A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - public void UnselectedVisual_SET_GET_VALUE() - { - /* TEST CODE */ - Button button = new PushButton(); - PropertyMap map = new PropertyMap(); - map.Insert("visualType", new PropertyValue("COLOR")); - Vector4 color = new Vector4(1.0f, 1.0f, 0.0f, 1.0f); - map.Insert("mixColor", new PropertyValue(color)); - button.UnselectedVisual = map; - - Vector4 color_get = new Vector4(0.0f, 0.0f, 0.0f, 0.0f); - button.UnselectedVisual.Find((int)Tizen.NUI.ColorVisualProperty.MixColor).Get(color_get); - Assert.AreEqual(color.X, color_get.X, "Should be equals to the color.X set"); - Assert.AreEqual(color.Y, color_get.Y, "Should be equals to the color.Y set"); - Assert.AreEqual(color.Z, color_get.Z, "Should be equals to the color.Z set"); - Assert.AreEqual(color.W, color_get.W, "Should be equals to the color.W set"); - } - - [Test] - [Category("P1")] - [Description("Test SelectedVisual.Check whether SelectedVisual is readable and writable.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Button.SelectedVisual A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - public void SelectedVisual_SET_GET_VALUE() - { - /* TEST CODE */ - Button button = new PushButton(); - - PropertyMap map = new PropertyMap(); - map.Insert("visualType", new PropertyValue("COLOR")); - Vector4 color = new Vector4(1.0f, 1.0f, 0.0f, 1.0f); - map.Insert("mixColor", new PropertyValue(color)); - button.SelectedVisual = map; - - Vector4 color_get = new Vector4(0.0f, 0.0f, 0.0f, 0.0f); - button.SelectedVisual.Find((int)Tizen.NUI.ColorVisualProperty.MixColor).Get(color_get); - Assert.AreEqual(color.X, color_get.X, "Should be equals to the color.X set"); - Assert.AreEqual(color.Y, color_get.Y, "Should be equals to the color.Y set"); - Assert.AreEqual(color.Z, color_get.Z, "Should be equals to the color.Z set"); - Assert.AreEqual(color.W, color_get.W, "Should be equals to the color.W set"); - } - - [Test] - [Category("P1")] - [Description("Test DisabledSelectedVisual.Check whether UnselectedVisual is readable and writable.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Button.DisabledSelectedVisual A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - public void DisabledSelectedVisual_SET_GET_VALUE() - { - /* TEST CODE */ - Button button = new PushButton(); - - PropertyMap map = new PropertyMap(); - map.Insert("visualType", new PropertyValue("COLOR")); - Vector4 color = new Vector4(1.0f, 1.0f, 0.0f, 1.0f); - map.Insert("mixColor", new PropertyValue(color)); - button.DisabledSelectedVisual = map; - - Vector4 color_get = new Vector4(0.0f, 0.0f, 0.0f, 0.0f); - button.DisabledSelectedVisual.Find((int)Tizen.NUI.ColorVisualProperty.MixColor).Get(color_get); - Assert.AreEqual(color.X, color_get.X, "Should be equals to the color.X set"); - Assert.AreEqual(color.Y, color_get.Y, "Should be equals to the color.Y set"); - Assert.AreEqual(color.Z, color_get.Z, "Should be equals to the color.Z set"); - Assert.AreEqual(color.W, color_get.W, "Should be equals to the color.W set"); - } - - [Test] - [Category("P1")] - [Description("Test DisabledUnselectedVisual.Check whether DisabledUnselectedVisual is readable and writable.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Button.DisabledUnselectedVisual A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - public void DisabledUnselectedVisual_SET_GET_VALUE() - { - /* TEST CODE */ - Button button = new PushButton(); - - PropertyMap map = new PropertyMap(); - map.Insert("visualType", new PropertyValue("COLOR")); - Vector4 color = new Vector4(1.0f, 1.0f, 0.0f, 1.0f); - map.Insert("mixColor", new PropertyValue(color)); - button.DisabledUnselectedVisual = map; - - Vector4 color_get = new Vector4(0.0f, 0.0f, 0.0f, 0.0f); - button.DisabledUnselectedVisual.Find((int)Tizen.NUI.ColorVisualProperty.MixColor).Get(color_get); - Assert.AreEqual(color.X, color_get.X, "Should be equals to the color.X set"); - Assert.AreEqual(color.Y, color_get.Y, "Should be equals to the color.Y set"); - Assert.AreEqual(color.Z, color_get.Z, "Should be equals to the color.Z set"); - Assert.AreEqual(color.W, color_get.W, "Should be equals to the color.W set"); - } - - [Test] - [Category("P1")] - [Description("Test UnselectedBackgroundVisual.Check whether UnselectedBackgroundVisual is readable and writable.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Button.UnselectedBackgroundVisual A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - public void UnselectedBackgroundVisual_SET_GET_VALUE() - { - /* TEST CODE */ - Button button = new PushButton(); - - PropertyMap map = new PropertyMap(); - map.Insert("visualType", new PropertyValue("COLOR")); - Vector4 color = new Vector4(1.0f, 1.0f, 0.0f, 1.0f); - map.Insert("mixColor", new PropertyValue(color)); - button.UnselectedBackgroundVisual = map; - - Vector4 color_get = new Vector4(0.0f, 0.0f, 0.0f, 0.0f); - button.UnselectedBackgroundVisual.Find((int)Tizen.NUI.ColorVisualProperty.MixColor).Get(color_get); - Assert.AreEqual(color.X, color_get.X, "Should be equals to the color.X set"); - Assert.AreEqual(color.Y, color_get.Y, "Should be equals to the color.Y set"); - Assert.AreEqual(color.Z, color_get.Z, "Should be equals to the color.Z set"); - Assert.AreEqual(color.W, color_get.W, "Should be equals to the color.W set"); - } - - [Test] - [Category("P1")] - [Description("Test SelectedBackgroundVisual.Check whether SelectedBackgroundVisual is readable and writable.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Button.SelectedBackgroundVisual A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - public void SelectedBackgroundVisual_SET_GET_VALUE() - { - /* TEST CODE */ - Button button = new PushButton(); - - PropertyMap map = new PropertyMap(); - map.Insert("visualType", new PropertyValue("COLOR")); - Vector4 color = new Vector4(1.0f, 1.0f, 0.0f, 1.0f); - map.Insert("mixColor", new PropertyValue(color)); - button.SelectedBackgroundVisual = map; - - Vector4 color_get = new Vector4(0.0f, 0.0f, 0.0f, 0.0f); - button.SelectedBackgroundVisual.Find((int)Tizen.NUI.ColorVisualProperty.MixColor).Get(color_get); - Assert.AreEqual(color.X, color_get.X, "Should be equals to the color.X set"); - Assert.AreEqual(color.Y, color_get.Y, "Should be equals to the color.Y set"); - Assert.AreEqual(color.Z, color_get.Z, "Should be equals to the color.Z set"); - Assert.AreEqual(color.W, color_get.W, "Should be equals to the color.W set"); - } - - [Test] - [Category("P1")] - [Description("Test DisabledUnselectedBackgroundVisual.Check whether DisabledUnselectedBackgroundVisual is readable and writable.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Button.DisabledUnselectedBackgroundVisual A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - public void DisabledUnselectedBackgroundVisual_SET_GET_VALUE() - { - /* TEST CODE */ - Button button = new PushButton(); - - PropertyMap map = new PropertyMap(); - map.Insert("visualType", new PropertyValue("COLOR")); - Vector4 color = new Vector4(1.0f, 1.0f, 0.0f, 1.0f); - map.Insert("mixColor", new PropertyValue(color)); - button.DisabledUnselectedBackgroundVisual = map; - - Vector4 color_get = new Vector4(0.0f, 0.0f, 0.0f, 0.0f); - button.DisabledUnselectedBackgroundVisual.Find((int)Tizen.NUI.ColorVisualProperty.MixColor).Get(color_get); - Assert.AreEqual(color.X, color_get.X, "Should be equals to the color.X set"); - Assert.AreEqual(color.Y, color_get.Y, "Should be equals to the color.Y set"); - Assert.AreEqual(color.Z, color_get.Z, "Should be equals to the color.Z set"); - Assert.AreEqual(color.W, color_get.W, "Should be equals to the color.W set"); - } - - [Test] - [Category("P1")] - [Description("Test DisabledSelectedBackgroundVisual.Check whether DisabledSelectedBackgroundVisual is readable and writable.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Button.DisabledSelectedBackgroundVisual A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - public void DisabledSelectedBackgroundVisual_SET_GET_VALUE() - { - /* TEST CODE */ - Button button = new PushButton(); - - PropertyMap map = new PropertyMap(); - map.Insert("visualType", new PropertyValue("COLOR")); - Vector4 color = new Vector4(1.0f, 1.0f, 0.0f, 1.0f); - map.Insert("mixColor", new PropertyValue(color)); - button.DisabledSelectedBackgroundVisual = map; - - Vector4 color_get = new Vector4(0.0f, 0.0f, 0.0f, 0.0f); - button.DisabledSelectedBackgroundVisual.Find((int)Tizen.NUI.ColorVisualProperty.MixColor).Get(color_get); - Assert.AreEqual(color.X, color_get.X, "Should be equals to the color.X set"); - Assert.AreEqual(color.Y, color_get.Y, "Should be equals to the color.Y set"); - Assert.AreEqual(color.Z, color_get.Z, "Should be equals to the color.Z set"); - Assert.AreEqual(color.W, color_get.W, "Should be equals to the color.W set"); - } - - [Test] - [Category("P1")] - [Description("Test LabelRelativeAlignment.Check whether LabelRelativeAlignment is readable and writable.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Button.LabelRelativeAlignment A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - public void LabelRelativeAlignment_SET_GET_VALUE() - { - /* TEST CODE */ - Button button = new PushButton(); - - button.LabelRelativeAlignment = Button.Align.End; - - Assert.AreEqual(Button.Align.End, button.LabelRelativeAlignment, "Should be equals to the set value"); - } - - [Test] - [Category("P1")] - [Description("Test LabelPadding.Check whether LabelPadding is readable and writable.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Button.LabelPadding A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - public void LabelPadding_SET_GET_VALUE() - { - /* TEST CODE */ - Button button = new PushButton(); - Vector4 padding = new Vector4(1.0f, 1.0f, 1.0f, 1.0f); - button.LabelPadding = padding; - - Assert.AreEqual(padding.R, button.LabelPadding.R, "Should be equals to the padding.R set"); - Assert.AreEqual(padding.G, button.LabelPadding.G, "Should be equals to the padding.G set"); - Assert.AreEqual(padding.B, button.LabelPadding.B, "Should be equals to the padding.B set"); - Assert.AreEqual(padding.A, button.LabelPadding.A, "Should be equals to the padding.A set"); - } - - [Test] - [Category("P1")] - [Description("Create a Button object. Check whether object is successfully created or not.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Button.Button C")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "CONSTR")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - public void Button_INIT() - { - /* TEST CODE */ - var button = new PushButton(); - Assert.IsNotNull(button, "Can't create success object Button"); - } - - [Test] - [Category("P1")] - [Description("Test AutoRepeating.Check whether AutoRepeating is readable and writeable")] - [Property("SPEC", "Tizen.NUI.UIComponents.Button.AutoRepeating A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - public void AutoRepeating_SET_GET_VALUE() - { - /* TEST CODE */ - Button button = new PushButton(); - button.AutoRepeating = true; - Assert.AreEqual(true, button.AutoRepeating, "Should be equals to the set value"); - } - - [Test] - [Category("P1")] - [Description("Test InitialAutoRepeatingDelay. Check whether InitialAutoRepeatingDelay is readable and writeable")] - [Property("SPEC", "Tizen.NUI.UIComponents.Button.InitialAutoRepeatingDelay A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - public void InitialAutoRepeatingDelay_SET_GET_VALUE() - { - /* TEST CODE */ - Button button = new PushButton(); - button.InitialAutoRepeatingDelay = 1.0f; - Assert.AreEqual(1.0f, button.InitialAutoRepeatingDelay, "Should be equals to the set value"); - } - - [Test] - [Category("P1")] - [Description("Test LabelText. Check whether LabelText is readable and writeable")] - [Property("SPEC", "Tizen.NUI.UIComponents.Button.LabelText A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - public void LabelText_SET_GET_VALUE() - { - /* TEST CODE */ - PushButton button = new PushButton(); - - button.LabelText = "Test LabelText"; - Assert.AreEqual("Test LabelText", button.LabelText, "Should be equals to the set value of text"); - } - - [Test] - [Category("P1")] - [Description("Test NextAutoRepeatingDelay. Check whether NextAutoRepeatingDelay is readable and writeable")] - [Property("SPEC", "Tizen.NUI.UIComponents.Button.NextAutoRepeatingDelay A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - public void NextAutoRepeatingDelay_SET_GET_VALUE() - { - /* TEST CODE */ - Button button = new PushButton(); - button.NextAutoRepeatingDelay = 1.0f; - Assert.AreEqual(1.0f, button.NextAutoRepeatingDelay, "Should be equals to the set value"); - } - - [Test] - [Category("P1")] - [Description("Test Togglable. Check whether Togglable is readable and writeable")] - [Property("SPEC", "Tizen.NUI.UIComponents.Button.Togglable A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - public void Togglable_SET_GET_VALUE() - { - /* TEST CODE */ - Button button = new PushButton(); - - button.Togglable = true; - Assert.AreEqual(true, button.Togglable, "Should be equals to the set value"); - } - - [Test] - [Category("P1")] - [Description("Test Selected. Check whether Selected is readable and writeable")] - [Property("SPEC", "Tizen.NUI.UIComponents.Button.Selected A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - public void Selected_SET_GET_VALUE() - { - /* TEST CODE */ - Button button = new PushButton(); - button.Size2D = new Size2D(200, 50); - Window.Instance.GetDefaultLayer().Add(button); - button.Togglable = true; - button.Selected = true; - - Assert.AreEqual(true, button.Selected, "Should be equals to the set value"); - } - - [Test] - [Category("P1")] - [Description("Test UnselectedColor. Check whether UnselectedColor is readable and writeable")] - [Property("SPEC", "Tizen.NUI.UIComponents.Button.UnselectedColor A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - public void UnselectedColor_SET_GET_VALUE() - { - /* TEST CODE */ - Button button = new PushButton(); - button.Size2D = new Size2D(200, 50); - Window.Instance.GetDefaultLayer().Add(button); - Color color = new Color(1.0f, 0.0f, 0.0f, 1.0f); - button.UnselectedColor = color; - - Assert.AreEqual(color.R, button.UnselectedColor.R, "Should be equals to the color.R set"); - Assert.AreEqual(color.G, button.UnselectedColor.G, "Should be equals to the color.G set"); - Assert.AreEqual(color.B, button.UnselectedColor.B, "Should be equals to the color.B set"); - Assert.AreEqual(color.A, button.UnselectedColor.A, "Should be equals to the color.A set"); - } - - [Test] - [Category("P1")] - [Description("Test SelectedColor. Check whether SelectedColor is readable and writeable")] - [Property("SPEC", "Tizen.NUI.UIComponents.Button.SelectedColor A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - public void SelectedColor_SET_GET_VALUE() - { - /* TEST CODE */ - Button button = new PushButton(); - button.Size2D = new Size2D(200, 50); - Window.Instance.GetDefaultLayer().Add(button); - Color color = new Color(1.0f, 0.0f, 0.0f, 1.0f); - button.SelectedColor = color; - - Assert.AreEqual(color.R, button.SelectedColor.R, "Should be equals to the color.R set"); - Assert.AreEqual(color.G, button.SelectedColor.G, "Should be equals to the color.G set"); - Assert.AreEqual(color.B, button.SelectedColor.B, "Should be equals to the color.B set"); - Assert.AreEqual(color.A, button.SelectedColor.A, "Should be equals to the color.A set"); - } - - [Test] - [Category("P1")] - [Description("Test Label. Check whether Label is readable and writeable")] - [Property("SPEC", "Tizen.NUI.UIComponents.Button.Label A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - public void Label_SET_GET_VALUE() - { - /* TEST CODE */ - Button button = new PushButton(); - - PropertyMap map = new PropertyMap(); - map.Insert("visualType", new PropertyValue("TEXT")); - map.Insert("pointSize", new PropertyValue(15.0f)); - map.Insert("text", new PropertyValue("Test Label")); - button.Label = map; - - PropertyMap propertyMap = button.Label; - - String text = ""; - (propertyMap.Find((int)Tizen.NUI.TextVisualProperty.Text)).Get(out text); - Assert.AreEqual("Test Label", text, "Should be equals to the set value of text"); - } - - [Test] - [Category("P1")] - [Description("Test StateChanged Event.Check whether StateChanged defined in the spec is callable.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Button.StateChanged E")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "EVL")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - public void StateChanged_CHECK_EVENT() - { - Button button = new PushButton(); - Window.Instance.GetDefaultLayer().Add(button); - - bool flag = false; - button.StateChanged += (obj, e) => - { - flag = true; - - return true; - }; - - button.Togglable = true; - button.Selected = true; - - Assert.IsTrue(flag, "StateChanged is not be called"); - } - } -} diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSCheckBoxButton.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSCheckBoxButton.cs deleted file mode 100755 index 3a0bdbc..0000000 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSCheckBoxButton.cs +++ /dev/null @@ -1,69 +0,0 @@ -using NUnit.Framework; -using NUnit.Framework.TUnit; -using System; -using Tizen.NUI; -using Tizen.NUI.Test; -using Tizen.NUI.UIComponents; - -namespace Tizen.NUI.Tests -{ - [TestFixture] - [Description("Tizen.NUI.UIComponents.CheckBoxButton Tests")] - public class CheckBoxButtonTests - { - private string TAG = "NUI"; - - [SetUp] - public void Init() - { - Tizen.Log.Info(TAG, " Init() is called!"); - App.MainTitleChangeText("CheckBoxButtonTests"); - App.MainTitleChangeBackgroundColor(null); - } - - [TearDown] - public void Destroy() - { - Tizen.Log.Info(TAG, " Destroy() is called!"); - } - - [Test] - [Category("P1")] - [Description("Create a checkBoxButton object.Check whether object is successfully created or not.")] - [Property("SPEC", "Tizen.NUI.UIComponents.CheckBoxButton.CheckBoxButton C")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "CONSTR")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - public void CheckBoxButton_INIT() - { - /* TEST CODE */ - var checkBox = new CheckBoxButton(); - - Assert.IsNotNull(checkBox, "Can't create success object CheckBoxButton"); - Assert.IsInstanceOf(checkBox, "Should be an instance of CheckBoxButton type."); - } - - [Test] - [Category("P1")] - [Description("Test Dispose, try to dispose the CheckBoxButton.")] - [Property("SPEC", "Tizen.NUI.UIComponents.CheckBoxButton.Dispose M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR MCST")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void Dispose_TEST() - { - /* TEST CODE */ - try - { - CheckBoxButton CheckBoxButton = new CheckBoxButton(); - CheckBoxButton.Dispose(); - } - catch (Exception e) - { - Tizen.Log.Error(TAG, "Caught Exception" + e.ToString()); - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); - Assert.Fail("Caught Exception" + e.ToString()); - } - } - } -} diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPopup.HiddenEventArgs.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPopup.HiddenEventArgs.cs deleted file mode 100755 index 8c250aa..0000000 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPopup.HiddenEventArgs.cs +++ /dev/null @@ -1,47 +0,0 @@ -using NUnit.Framework; -using NUnit.Framework.TUnit; -using System; -using Tizen.NUI; -using Tizen.NUI.UIComponents; -using System.Threading.Tasks; -using Tizen.NUI.Test; - -namespace Tizen.NUI.Tests -{ - - [TestFixture] - [Description("Tizen.NUI.UIComponents.Popup.HiddenEventArgs Tests")] - public class PopupHiddenEventArgsTests - { - private string TAG = "NUI"; - private string image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "Tizen.NUI.Tests.png"; - - [SetUp] - public void Init() - { - Tizen.Log.Info(TAG, "Init() is called!"); - App.MainTitleChangeText("HiddenEventArgsTests"); - App.MainTitleChangeBackgroundColor(null); - } - - [TearDown] - public void Destroy() - { - Tizen.Log.Info(TAG, "Destroy() is called!"); - } - - [Test] - [Category("P1")] - [Description("dali Popup.HiddenEventArgs constructor test")] - [Property("SPEC", "Tizen.NUI.UIComponents.Popup.HiddenEventArgs.HiddenEventArgs C")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "CONSTR")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void HiddenEventArgs_INIT() - { - /* TEST CODE */ - var hiddenEventArgs = new Popup.HiddenEventArgs(); - Assert.IsInstanceOf(hiddenEventArgs, "Should return Popup.HiddenEventArgs instance."); - } - } -} \ No newline at end of file diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPopup.HidingEventArgs.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPopup.HidingEventArgs.cs deleted file mode 100755 index ff7d8fe..0000000 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPopup.HidingEventArgs.cs +++ /dev/null @@ -1,47 +0,0 @@ -using NUnit.Framework; -using NUnit.Framework.TUnit; -using System; -using Tizen.NUI; -using Tizen.NUI.UIComponents; -using System.Threading.Tasks; -using Tizen.NUI.Test; - -namespace Tizen.NUI.Tests -{ - - [TestFixture] - [Description("Tizen.NUI.UIComponents.Popup.HidingEventArgs Tests")] - public class PopupHidingEventArgsTests - { - private string TAG = "NUI"; - private string image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "Tizen.NUI.Tests.png"; - - [SetUp] - public void Init() - { - Tizen.Log.Info(TAG, "Init() is called!"); - App.MainTitleChangeText("HidingEventArgsTests"); - App.MainTitleChangeBackgroundColor(null); - } - - [TearDown] - public void Destroy() - { - Tizen.Log.Info(TAG, "Destroy() is called!"); - } - - [Test] - [Category("P1")] - [Description("dali Popup.HidingEventArgs constructor test")] - [Property("SPEC", "Tizen.NUI.UIComponents.Popup.HidingEventArgs.HidingEventArgs C")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "CONSTR")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void HidingEventArgs_INIT() - { - /* TEST CODE */ - var hidingEventArgs = new Popup.HidingEventArgs(); - Assert.IsInstanceOf(hidingEventArgs, "Should return Popup.HidingEventArgs instance."); - } - } -} \ No newline at end of file diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPopup.ShowingEventArgs.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPopup.ShowingEventArgs.cs deleted file mode 100755 index 6988659..0000000 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPopup.ShowingEventArgs.cs +++ /dev/null @@ -1,47 +0,0 @@ -using NUnit.Framework; -using NUnit.Framework.TUnit; -using System; -using Tizen.NUI; -using Tizen.NUI.UIComponents; -using System.Threading.Tasks; -using Tizen.NUI.Test; - -namespace Tizen.NUI.Tests -{ - - [TestFixture] - [Description("Tizen.NUI.UIComponents.Popup.ShowingEventArgs Tests")] - public class PopupShowingEventArgsTests - { - private string TAG = "NUI"; - private string image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "Tizen.NUI.Tests.png"; - - [SetUp] - public void Init() - { - Tizen.Log.Info(TAG, "Init() is called!"); - App.MainTitleChangeText("ShowingEventArgsTests"); - App.MainTitleChangeBackgroundColor(null); - } - - [TearDown] - public void Destroy() - { - Tizen.Log.Info(TAG, "Destroy() is called!"); - } - - [Test] - [Category("P1")] - [Description("dali Popup.ShowingEventArgs constructor test")] - [Property("SPEC", "Tizen.NUI.UIComponents.Popup.ShowingEventArgs.ShowingEventArgs C")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "CONSTR")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void ShowingEventArgs_INIT() - { - /* TEST CODE */ - var showingEventArgs = new Popup.ShowingEventArgs(); - Assert.IsInstanceOf(showingEventArgs, "Should return Popup.ShowingEventArgs instance."); - } - } -} \ No newline at end of file diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPopup.ShownEventArgs.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPopup.ShownEventArgs.cs deleted file mode 100755 index 22e6543..0000000 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPopup.ShownEventArgs.cs +++ /dev/null @@ -1,47 +0,0 @@ -using NUnit.Framework; -using NUnit.Framework.TUnit; -using System; -using Tizen.NUI; -using Tizen.NUI.UIComponents; -using System.Threading.Tasks; -using Tizen.NUI.Test; - -namespace Tizen.NUI.Tests -{ - - [TestFixture] - [Description("Tizen.NUI.UIComponents.Popup.ShownEventArgs Tests")] - public class PopupShownEventArgsTests - { - private string TAG = "NUI"; - private string image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "Tizen.NUI.Tests.png"; - - [SetUp] - public void Init() - { - Tizen.Log.Info(TAG, "Init() is called!"); - App.MainTitleChangeText("ShownEventArgsTests"); - App.MainTitleChangeBackgroundColor(null); - } - - [TearDown] - public void Destroy() - { - Tizen.Log.Info(TAG, "Destroy() is called!"); - } - - [Test] - [Category("P1")] - [Description("dali Popup.ShownEventArgs constructor test")] - [Property("SPEC", "Tizen.NUI.UIComponents.Popup.ShownEventArgs.ShownEventArgs C")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "CONSTR")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void ShownEventArgs_INIT() - { - /* TEST CODE */ - var shownEventArgs = new Popup.ShownEventArgs(); - Assert.IsInstanceOf(shownEventArgs, "Should return Popup.ShownEventArgs instance."); - } - } -} \ No newline at end of file diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPopup.TouchedOutsideEventArgs.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPopup.TouchedOutsideEventArgs.cs deleted file mode 100755 index 3d61c30..0000000 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPopup.TouchedOutsideEventArgs.cs +++ /dev/null @@ -1,47 +0,0 @@ -using NUnit.Framework; -using NUnit.Framework.TUnit; -using System; -using Tizen.NUI; -using Tizen.NUI.UIComponents; -using System.Threading.Tasks; -using Tizen.NUI.Test; - -namespace Tizen.NUI.Tests -{ - - [TestFixture] - [Description("Tizen.NUI.UIComponents.Popup.TouchedOutsideEventArgs Tests")] - public class PopupTouchedOutsideEventArgsTests - { - private string TAG = "NUI"; - private string image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "Tizen.NUI.Tests.png"; - - [SetUp] - public void Init() - { - Tizen.Log.Info(TAG, "Init() is called!"); - App.MainTitleChangeText("TouchedOutsideEventArgsTests"); - App.MainTitleChangeBackgroundColor(null); - } - - [TearDown] - public void Destroy() - { - Tizen.Log.Info(TAG, "Destroy() is called!"); - } - - [Test] - [Category("P1")] - [Description("dali Popup.TouchedOutsideEventArgs constructor test")] - [Property("SPEC", "Tizen.NUI.UIComponents.Popup.TouchedOutsideEventArgs.TouchedOutsideEventArgs C")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "CONSTR")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void TouchedOutsideEventArgs_INIT() - { - /* TEST CODE */ - var touchedOutsideEventArgs = new Popup.TouchedOutsideEventArgs(); - Assert.IsInstanceOf(touchedOutsideEventArgs, "Should return Popup.TouchedOutsideEventArgs instance."); - } - } -} \ No newline at end of file diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPopup.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPopup.cs deleted file mode 100755 index 9ece376..0000000 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPopup.cs +++ /dev/null @@ -1,1261 +0,0 @@ -using NUnit.Framework; -using NUnit.Framework.TUnit; -using System; -using Tizen.NUI; -using Tizen.NUI.UIComponents; -using Tizen.NUI.BaseComponents; -using System.Threading.Tasks; -using Tizen.NUI.Test; - -namespace Tizen.NUI.Tests -{ - using tlog = Tizen.Log; - - [TestFixture] - [Description("Tizen.NUI.UIComponents.Popup Tests")] - public class PopupTests - { - private string TAG = "NUI"; - private string image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png"; - - [SetUp] - public void Init() - { - Tizen.Log.Info(TAG, "Init() is called!"); - App.MainTitleChangeText("PopupTests"); - App.MainTitleChangeBackgroundColor(null); - } - - [TearDown] - public void Destroy() - { - Tizen.Log.Info(TAG, "Destroy() is called!"); - } - - private void OnTouchedOutside(object obj, EventArgs e) - { } - - [Test] - [Category("P1")] - [Description("Create a popup object. Check whether object is successfully created or not.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Popup.Popup C")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "CONSTR")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - public async Task Popup_INIT() - { - /* 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); - - - await Task.Delay(3000); - - popup.Size2D = new Size2D(100, 100); - - popup.Unparent(); - } - - [Test] - [Category("P1")] - [Description("Test SetTitle.Check whether Title is set successfully.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Popup.SetTitle M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - public void SetTitle_CHECK_VALUE() - { - /* 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"); - - 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); - - popup.Unparent(); - - } - catch (Exception e) - { - Tizen.Log.Error(TAG, "Caught Exception" + e.ToString()); - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); - Assert.Fail("Caught Exception" + e.ToString()); - } - } - - [Test] - [Category("P1")] - [Description("Test SetContent.Check whether Content is set successfully.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Popup.SetContent M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - public void SetContent_CHECK_VALUE() - { - /* 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"); - - 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); - - popup.Unparent(); - - } - catch (Exception e) - { - Tizen.Log.Error(TAG, "Caught Exception" + e.ToString()); - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); - Assert.Fail("Caught Exception" + e.ToString()); - } - } - - [Test] - [Category("P1")] - [Description("Test SetFooter.Check whether Footer is set successfully.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Popup.SetFooter M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - public void SetFooter_CHECK_VALUE() - { - /* 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"); - - 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); - - popup.Unparent(); - - } - catch (Exception e) - { - Tizen.Log.Error(TAG, "Caught Exception" + e.ToString()); - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); - Assert.Fail("Caught Exception" + e.ToString()); - } - } - - [Test] - [Category("P1")] - [Description("Test Title.Check whether Title is readable and writeable.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Popup.Title A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - 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"); - - 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"); - - map.Add("type", new PropertyValue(label.GetTypeName())); - map.Add("text", new PropertyValue("test title")); - popup.Title = map; - - var propertyMap = popup.Title; - - 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"); - - popup.Size2D = new Size2D(100, 100); - - popup.Unparent(); - - } - - [Test] - [Category("P1")] - [Description("Test Content.Check whether Content is readable and writeable.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Popup.Content A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - 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); - - 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 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 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"); - - 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 content", text, "Should be equals to the set value of text"); - - popup.Unparent(); - } - - [Test] - [Category("P1")] - [Description("Test Footer.Check whether Footer is readable and writeable.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Popup.Footer A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - 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"); - - 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 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 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"); - - 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 Footer", text, "Should be equals to the set value of text"); - - popup.Unparent(); - } - - [Test] - [Category("P1")] - [Description("Test ExitAnimation.Check whether ExitAnimation is readable and writeable.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Popup.ExitAnimation A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - 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); - - 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"); - - 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"); - - 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("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"); - - timePeriodMapExit.PushBack(new PropertyValue(0.0f)); - timePeriodMapExit.PushBack(new PropertyValue(0.2f)); - animationMapExit.Insert("timePeriod", new PropertyValue(timePeriodMapExit)); - popup.ExitAnimation = animationMapExit; - popup.SetDisplayState(Popup.DisplayStateType.Shown); - - 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"); - - popup.Unparent(); - } - - [Test] - [Category("P1")] - [Description("Test EntryAnimation.Check whether EntryAnimation is readable and writeable.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Popup.EntryAnimation A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - 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); - - 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"); - - 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"); - - 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"); - - 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"); - - timePeriodMapEntry.PushBack(new PropertyValue(0.0f)); - timePeriodMapEntry.PushBack(new PropertyValue(1.0f)); - animationMapEntry.Insert("timePeriod", new PropertyValue(timePeriodMapEntry)); - popup.EntryAnimation = animationMapEntry; - popup.SetDisplayState(Popup.DisplayStateType.Shown); - - await Task.Delay(20); - - Assert.IsNotNull(popup, "Should not be a Null : Popup"); - Assert.IsNotNull(popup.EntryAnimation, "Should not be a Null : Popup.EntryAnimation"); - - popup.Unparent(); - } - - [Test] - [Category("P1")] - [Description("Test SetDisplayState.Check whether set DisplayState successfully")] - [Property("SPEC", "Tizen.NUI.UIComponents.Popup.SetDisplayState M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MCST")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - public void SetDisplayState_CHECK_STATE() - { - /* 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"); - - Window.Instance.GetDefaultLayer().Add(popup); - - popup.Size2D = new Size2D(100, 100); - popup.AnimationDuration = 0.0f; - popup.SetDisplayState(Popup.DisplayStateType.Shown); - - //in the above, it only set DisplayStateType.Shown only, no need to check other properties. - Assert.AreEqual(Popup.DisplayStateType.Shown, popup.DisplayState, "Should be equals to the set value of DisplayState"); - - popup.Unparent(); - } - catch (Exception e) - { - Tizen.Log.Error(TAG, "Caught Exception" + e.ToString()); - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); - Assert.Fail("Caught Exception" + e.ToString()); - } - } - - [Test] - [Category("P1")] - [Description("Test Shown.Check whether Shown will be triggered successfully")] - [Property("SPEC", "Tizen.NUI.UIComponents.Popup.Shown E")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "EVL")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - 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); - - popup.Size2D = new Size2D(100, 100); - - popup.AnimationDuration = 0.0f; - 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; - } - - bool flag = false; - [Test] - [Category("P1")] - [Description("Test Showing.Check whether Showing will be triggered successfully")] - [Property("SPEC", "Tizen.NUI.UIComponents.Popup.Showing E")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "EVL")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - 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"); - - 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); - - popup.AnimationDuration = 0.1f; - flag = false; - popup.Showing += Popup_Showing; - popup.SetDisplayState(Popup.DisplayStateType.Showing); - - Assert.IsTrue(flag, "Showing Should be triggered!"); - - popup.Showing -= Popup_Showing; - popup.Unparent(); - } - - private void Popup_Showing(object sender, Popup.ShowingEventArgs e) - { - flag = true; - } - - [Test] - [Category("P1")] - [Description("Test Hidden.Check whether Hidden will be triggered successfully")] - [Property("SPEC", "Tizen.NUI.UIComponents.Popup.Hidden E")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "EVL")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - 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"); - - popup.AnimationDuration = 0.1f; - 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); - - await Task.Delay(1200); - popup.SetDisplayState(Popup.DisplayStateType.Hidden); - await Task.Delay(1200); - Assert.IsTrue(flag, "Hidden Should be triggered!"); - - popup.Hidden -= Popup_Hidden; - popup.Unparent(); - } - - private void Popup_Hidden(object sender, Popup.HiddenEventArgs e) - { - flag = true; - } - - [Test] - [Category("P1")] - [Description("Test Hiding.Check whether Hiding will be triggered successfully")] - [Property("SPEC", "Tizen.NUI.UIComponents.Popup.Hiding E")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "EVL")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - 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"); - - 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); - - popup.SetDisplayState(Popup.DisplayStateType.Shown); - popup.SetDisplayState(Popup.DisplayStateType.Hidden); - - Assert.IsTrue(flag, "Hiding Should be triggered!"); - - popup.Hide(); - popup.Hiding -= Popup_Hiding; - popup.Unparent(); - } - - private void Popup_Hiding(object sender, Popup.HidingEventArgs e) - { - flag = true; - } - - [Test] - [Category("P1")] - [Description("Test DisplayState.Check whether DisplayState is readable and writeable.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Popup.DisplayState A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - 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"); - - 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); - - Assert.AreEqual(Popup.DisplayStateType.Hidden, popup.DisplayState, "Should be equals to the set value of DisplayState"); - - popup.Unparent(); - } - - [Test] - [Category("P1")] - [Description("Test TouchTransparent.Check whether TouchTransparent is readable and writeable.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Popup.TouchTransparent A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - 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"); - - 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.TouchTransparent = false; - Assert.AreEqual(false, popup.TouchTransparent, "Should be equals to the set value of TouchTransparent"); - - popup.Unparent(); - } - - [Test] - [Category("P1")] - [Description("Test TailVisibility.Check whether TailVisibility is readable and writeable.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Popup.TailVisibility A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - 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); - - popup.TailVisibility = true; - 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"); - - popup.Unparent(); - } - - [Test] - [Category("P1")] - [Description("Test TailPosition.Check whether TailPosition is readable and writeable.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Popup.TailPosition A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - 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 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"); - - 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"); - - Window.Instance.GetDefaultLayer().Add(popup); - - Assert.AreEqual(vector3.X, popup.TailPosition.X, "Should be equals to the set value of TailPosition.X"); - Assert.AreEqual(vector3.Y, popup.TailPosition.Y, "Should be equals to the set value of TailPosition.Y"); - Assert.AreEqual(vector3.Z, popup.TailPosition.Z, "Should be equals to the set value of TailPosition.Z"); - - popup.Unparent(); - } - - [Test] - [Category("P1")] - [Description("Test ContextualMode.Check whether ContextualMode is readable and writeable.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Popup.ContextualMode A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - 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"); - - 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.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. - popup.ContextualMode = Popup.ContextualModeType.Rright; - 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"); - - popup.ContextualMode = Popup.ContextualModeType.Left; - Assert.AreEqual(Popup.ContextualModeType.Left, popup.ContextualMode, "Should be equals to the set value of ContextualMode"); - - popup.Unparent(); - } - - [Test] - [Category("P1")] - [Description("Test AnimationDuration.Check whether ContextualMode is readable and writeable.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Popup.AnimationDuration A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - 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"); - - 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); - - Assert.AreEqual(0.6f, popup.AnimationDuration, "Should be equals to the set value of AnimationDuration"); - - popup.Unparent(); - } - - [Test] - [Category("P1")] - [Description("Test AnimationMode.Check whether AnimationMode is readable and writeable.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Popup.AnimationMode A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - 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"); - - 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.AnimationMode = Popup.AnimationModeType.None; - 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"); - - popup.AnimationMode = Popup.AnimationModeType.Fade; - Assert.AreEqual(Popup.AnimationModeType.Fade, popup.AnimationMode, "Should be equals to the set value of AnimationMode"); - - popup.Unparent(); - } - - [Test] - [Category("P1")] - [Description("Test AutoHideDelay.Check whether AutoHideDelay is readable and writeable.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Popup.AutoHideDelay A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - 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"); - - 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); - - Assert.AreEqual(10, popup.AutoHideDelay, "Should be equals to the set value of AutoHideDelay"); - - popup.Unparent(); - } - - [Test] - [Category("P1")] - [Description("Test BackingEnabled.Check whether BackingEnabled is readable and writeable.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Popup.BackingEnabled A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - 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"); - - 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.BackingEnabled = false; - Assert.AreEqual(false, popup.BackingEnabled, "Should be equals to the set value of BackingEnabled"); - - popup.Unparent(); - } - - [Test] - [Category("P1")] - [Description("Test BackingColor.Check whether BackingColor is readable and writeable.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Popup.BackingColor A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - 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 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"); - - 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); - - 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"); - Assert.AreEqual(color.A, popup.BackingColor.A, "Should be equals to the set value of BackingColor.A"); - - popup.Unparent(); - } - - [Test] - [Category("P1")] - [Description("Test PopupBackgroundImage.Check whether PopupBackgroundImage is readable and writeable.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Popup.PopupBackgroundImage A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - 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 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); - - Assert.AreEqual(imageString, popup.PopupBackgroundImage, "Should be equals to the set value of PopupBackgroundImage"); - - popup.Unparent(); - } - - [Test] - [Category("P1")] - [Description("Test PopupBackgroundBorder.Check whether PopupBackgroundBorder is readable and writeable.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Popup.PopupBackgroundBorder A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - 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 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"); - - 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); - - 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"); - Assert.AreEqual(0, popup.PopupBackgroundBorder.Height, "Should be equals to the set value of PopupBackgroundBorder.height"); - - popup.Unparent(); - } - - [Test] - [Category("P1")] - [Description("Test TailUpImage.Check whether TailUpImage is readable and writeable.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Popup.TailUpImage A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - 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"); - - 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); - - Assert.AreEqual(imageString, popup.TailUpImage, "Should be equals to the set value of TailUpImage"); - - popup.Unparent(); - } - - [Test] - [Category("P1")] - [Description("Test TailDownImage.Check whether TailDownImage is readable and writeable.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Popup.TailDownImage A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - 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 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.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); - - Assert.AreEqual(imageString, popup.TailDownImage, "Should be equals to the set value of TailDownImage"); - - popup.Unparent(); - } - - [Test] - [Category("P1")] - [Description("Test TailLeftImage.Check whether TailLeftImage is readable and writeable.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Popup.TailLeftImage A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - 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 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.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); - - Assert.AreEqual(imageString, popup.TailLeftImage, "Should be equals to the set value of TailLeftImage"); - - popup.Unparent(); - } - - [Test] - [Category("P1")] - [Description("Test TailRightImage.Check whether TailRightImage is readable and writeable.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Popup.TailRightImage A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - 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 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.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); - - Assert.AreEqual(imageString, popup.TailRightImage, "Should be equals to the set value of TailRightImage"); - - popup.Unparent(); - } - - [Test] - [Category("P1")] - [Description("Test Dispose, try to dispose the Popup.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Popup.Dispose M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MCST")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void Dispose_TEST() - { - /* 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); - - popup.Unparent(); - popup.Dispose(); - } - catch (Exception e) - { - Tizen.Log.Error(TAG, "Caught Exception" + e.ToString()); - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); - Assert.Fail("Caught Exception" + e.ToString()); - } - } - - } -} diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPushButton.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPushButton.cs deleted file mode 100755 index e8e8908..0000000 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPushButton.cs +++ /dev/null @@ -1,69 +0,0 @@ -using NUnit.Framework; -using NUnit.Framework.TUnit; -using System; -using Tizen.NUI; -using Tizen.NUI.UIComponents; -using Tizen.NUI.Test; - -namespace Tizen.NUI.Tests -{ - [TestFixture] - [Description("Tizen.NUI.UIComponents.PushButton Tests")] - public class PushButtonTests - { - private string TAG = "NUI"; - private string image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "Tizen.NUI.Tests.png"; - - [SetUp] - public void Init() - { - Tizen.Log.Info(TAG, "Init() is called!"); - App.MainTitleChangeText("PushButtonTests"); - App.MainTitleChangeBackgroundColor(null); - } - - [TearDown] - public void Destroy() - { - Tizen.Log.Info(TAG, "Destroy() is called!"); - } - - [Test] - [Category("P1")] - [Description("Create a PushButton object. Check whether PushButton is successfully created or not.")] - [Property("SPEC", "Tizen.NUI.UIComponents.PushButton.PushButton C")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "CONSTR")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - public void PushButton_INIT() - { - /* TEST CODE */ - var pushButton = new PushButton(); - Assert.IsNotNull(pushButton, "Can't create success object PushButton"); - Assert.IsInstanceOf(pushButton, "Should be an instance of PushButton type."); - } - - [Test] - [Category("P1")] - [Description("Test Dispose, try to dispose the PushButton.")] - [Property("SPEC", "Tizen.NUI.UIComponents.PushButton.Dispose M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR MCST")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void Dispose_TEST() - { - /* TEST CODE */ - try - { - PushButton pushButton = new PushButton(); - pushButton.Dispose(); - } - catch (Exception e) - { - Tizen.Log.Error(TAG, "Caught Exception" + e.ToString()); - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); - Assert.Fail("Caught Exception" + e.ToString()); - } - } - } -} diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSRadioButton.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSRadioButton.cs deleted file mode 100755 index 8c78869..0000000 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSRadioButton.cs +++ /dev/null @@ -1,86 +0,0 @@ -using NUnit.Framework; -using NUnit.Framework.TUnit; -using System; -using Tizen.NUI; -using Tizen.NUI.UIComponents; -using Tizen.NUI.Test; - -namespace Tizen.NUI.Tests -{ - - [TestFixture] - [Description("Tizen.NUI.UIComponents.RadioButton Tests")] - public class RadioButtonTests - { - private string TAG = "NUI"; - - [SetUp] - public void Init() - { - Tizen.Log.Info(TAG, "#################### Init() is called!"); - App.MainTitleChangeText("RadioButtonTests"); - App.MainTitleChangeBackgroundColor(null); - } - - [TearDown] - public void Destroy() - { - Tizen.Log.Info(TAG, "#################### Destroy() is called!"); - } - - [Test] - [Category("P1")] - [Description("Create a RadioButton object. Check whether object is successfully created or not.")] - [Property("SPEC", "Tizen.NUI.UIComponents.RadioButton.RadioButton C")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "CONSTR")] - [Property("COVPARAM", "")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - public void RadioButton_INIT() - { - /* TEST CODE */ - var radioButton = new RadioButton(); - Assert.IsTrue(radioButton != null, "Can't create success object RadioButton"); - Assert.IsInstanceOf(radioButton, "Should be an instance of RadioButton type."); - } - - [Test] - [Category("P1")] - [Description("Create a RadioButton object. Check whether RadioButtonButton object which set LabelText is successfully created or not")] - [Property("SPEC", "Tizen.NUI.UIComponents.RadioButton.RadioButton C")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "CONSTR")] - [Property("COVPARAM", "string")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - public void RadioButton_INIT_WITH_STRING() - { - /* TEST CODE */ - var radioButton = new RadioButton("test"); - Assert.IsNotNull(radioButton, "Can't create success object RadioButton"); - Assert.IsInstanceOf(radioButton, "Should be an instance of RadioButton type."); - } - - [Test] - [Category("P1")] - [Description("Test Dispose, try to dispose the RadioButton.")] - [Property("SPEC", "Tizen.NUI.UIComponents.RadioButton.Dispose M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR MCST")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void Dispose_CHECK_RETURN_TYPE() - { - /* TEST CODE */ - try - { - RadioButton radioButton = new RadioButton(); - radioButton.Dispose(); - } - catch (Exception e) - { - Tizen.Log.Error(TAG, "Caught Exception" + e.ToString()); - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); - Assert.Fail("Caught Exception" + e.ToString()); - } - } - } -} diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSScrollView.Property.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSScrollView.Property.cs deleted file mode 100755 index 39cca90..0000000 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSScrollView.Property.cs +++ /dev/null @@ -1,386 +0,0 @@ -using NUnit.Framework; -using NUnit.Framework.TUnit; -using System; -using Tizen.NUI; -using Tizen.NUI.BaseComponents; -using Tizen.NUI.Test; - -namespace Tizen.NUI.Tests -{ - [TestFixture] - [Description("Tizen.NUI.ScrollView.Property Tests")] - public class ScrollViewPropertyTests - { - private string TAG = "NUI"; - private static int PROPERTY_START_INDEX = 10000000 + 1000 + 1 + 1000 + 1; - - private static int ANIMATABLE_PROPERTY_START_INDEX = 20000000 + 1000 + 1; - - [SetUp] - public void Init() - { - Tizen.Log.Info(TAG, "Init() is called!"); - App.MainTitleChangeText("ScrollViewPropertyTests"); - App.MainTitleChangeBackgroundColor(null); - } - - [TearDown] - public void Destroy() - { - Tizen.Log.Info(TAG, "Destroy() is called!"); - } - - [Test] - [Category("P1")] - [Description("Create a Property object. Check whether Property is successfully created or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.Property.Property C")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "CONSTR")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void Property_INIT() - { - /* TEST CODE */ - var property = new ScrollView.Property(); - Assert.IsNotNull(property, "Can't create success object Property"); - Assert.IsInstanceOf(property, "Should be an instance of Property type."); - } - - [Test] - [Category("P1")] - [Description("Test WRAP_ENABLED. Check whether WRAP_ENABLED returns expected value or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.Property.WRAP_ENABLED A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRO")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void WRAP_ENABLED_GET_VALUE() - { - /* TEST CODE */ - Assert.AreEqual(PROPERTY_START_INDEX, ScrollView.Property.WRAP_ENABLED, "WRAP_ENABLED shold be equals to the set value"); - } - - [Test] - [Category("P1")] - [Description("Test PANNING_ENABLED. Check whether PANNING_ENABLED returns expected value or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.Property.PANNING_ENABLED A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRO")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void PANNING_ENABLED_GET_VALUE() - { - /* TEST CODE */ - Assert.AreEqual(PROPERTY_START_INDEX + 1, ScrollView.Property.PANNING_ENABLED, "PANNING_ENABLED shold be equals to the set value"); - } - - [Test] - [Category("P1")] - [Description("Test AXIS_AUTO_LOCK_ENABLED. Check whether AXIS_AUTO_LOCK_ENABLED returns expected value or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.Property.AXIS_AUTO_LOCK_ENABLED A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRO")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void AXIS_AUTO_LOCK_ENABLED_GET_VALUE() - { - /* TEST CODE */ - Assert.AreEqual(PROPERTY_START_INDEX + 2, ScrollView.Property.AXIS_AUTO_LOCK_ENABLED, "AXIS_AUTO_LOCK_ENABLED shold be equals to the set value"); - } - - [Test] - [Category("P1")] - [Description("Test WHEEL_SCROLL_DISTANCE_STEP. Check whether WHEEL_SCROLL_DISTANCE_STEP returns expected value or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.Property.WHEEL_SCROLL_DISTANCE_STEP A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRO")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void WHEEL_SCROLL_DISTANCE_STEP_GET_VALUE() - { - /* TEST CODE */ - Assert.AreEqual(PROPERTY_START_INDEX + 3, ScrollView.Property.WHEEL_SCROLL_DISTANCE_STEP, "WHEEL_SCROLL_DISTANCE_STEP shold be equals to the set value"); - } - - [Test] - [Category("P1")] - [Description("Test SCROLL_MODE. Check whether SCROLL_MODE returns expected value or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.Property.SCROLL_MODE A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRO")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void SCROLL_MODE_GET_VALUE() - { - /* TEST CODE */ - Assert.AreEqual(PROPERTY_START_INDEX + 4, ScrollView.Property.SCROLL_MODE, "SCROLL_MODE shold be equals to the set value"); - } - - [Test] - [Category("P1")] - [Description("Test SCROLL_POSITION. Check whether SCROLL_POSITION returns expected value or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.Property.SCROLL_POSITION A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRO")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void SCROLL_POSITION_GET_VALUE() - { - /* TEST CODE */ - Assert.AreEqual(ANIMATABLE_PROPERTY_START_INDEX, ScrollView.Property.SCROLL_POSITION, "SCROLL_POSITION shold be equals to the set value"); - } - - [Test] - [Category("P1")] - [Description("Test SCROLL_PRE_POSITION. Check whether SCROLL_PRE_POSITION returns expected value or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.Property.SCROLL_PRE_POSITION A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRO")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void SCROLL_PRE_POSITION_GET_VALUE() - { - /* TEST CODE */ - Assert.AreEqual(ANIMATABLE_PROPERTY_START_INDEX + 1, ScrollView.Property.SCROLL_PRE_POSITION, "SCROLL_PRE_POSITION shold be equals to the set value"); - } - - [Test] - [Category("P1")] - [Description("Test SCROLL_PRE_POSITION_X. Check whether SCROLL_PRE_POSITION_X returns expected value or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.Property.SCROLL_PRE_POSITION_X A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRO")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void SCROLL_PRE_POSITION_X_GET_VALUE() - { - /* TEST CODE */ - Assert.AreEqual(ANIMATABLE_PROPERTY_START_INDEX + 2, ScrollView.Property.SCROLL_PRE_POSITION_X, "SCROLL_PRE_POSITION_X shold be equals to the set value"); - } - - [Test] - [Category("P1")] - [Description("Test SCROLL_PRE_POSITION_Y. Check whether SCROLL_PRE_POSITION_Y returns expected value or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.Property.SCROLL_PRE_POSITION_Y A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRO")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void SCROLL_PRE_POSITION_Y_GET_VALUE() - { - /* TEST CODE */ - Assert.AreEqual(ANIMATABLE_PROPERTY_START_INDEX + 3, ScrollView.Property.SCROLL_PRE_POSITION_Y, "SCROLL_PRE_POSITION_Y shold be equals to the set value"); - } - - [Test] - [Category("P1")] - [Description("Test SCROLL_PRE_POSITION_MAX. Check whether SCROLL_PRE_POSITION_MAX returns expected value or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.Property.SCROLL_PRE_POSITION_MAX A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRO")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void SCROLL_PRE_POSITION_MAX_GET_VALUE() - { - /* TEST CODE */ - Assert.AreEqual(ANIMATABLE_PROPERTY_START_INDEX + 4, ScrollView.Property.SCROLL_PRE_POSITION_MAX, "SCROLL_PRE_POSITION_MAX shold be equals to the set value"); - } - - [Test] - [Category("P1")] - [Description("Test SCROLL_PRE_POSITION_MAX_X. Check whether SCROLL_PRE_POSITION_MAX_X returns expected value or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.Property.SCROLL_PRE_POSITION_MAX_X A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRO")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void SCROLL_PRE_POSITION_MAX_X_GET_VALUE() - { - /* TEST CODE */ - Assert.AreEqual(ANIMATABLE_PROPERTY_START_INDEX + 5, ScrollView.Property.SCROLL_PRE_POSITION_MAX_X, "SCROLL_PRE_POSITION_MAX_X shold be equals to the set value"); - } - - [Test] - [Category("P1")] - [Description("Test SCROLL_PRE_POSITION_MAX_Y. Check whether SCROLL_PRE_POSITION_MAX_Y returns expected value or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.Property.SCROLL_PRE_POSITION_MAX_Y A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRO")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void SCROLL_PRE_POSITION_MAX_Y_GET_VALUE() - { - /* TEST CODE */ - Assert.AreEqual(ANIMATABLE_PROPERTY_START_INDEX + 6, ScrollView.Property.SCROLL_PRE_POSITION_MAX_Y, "SCROLL_PRE_POSITION_MAX_Y shold be equals to the set value"); - } - - [Test] - [Category("P1")] - [Description("Test OVERSHOOT_X. Check whether OVERSHOOT_X returns expected value or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.Property.OVERSHOOT_X A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRO")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void OVERSHOOT_X_GET_VALUE() - { - /* TEST CODE */ - Assert.AreEqual(ANIMATABLE_PROPERTY_START_INDEX + 7, ScrollView.Property.OVERSHOOT_X, "OVERSHOOT_X shold be equals to the set value"); - } - - [Test] - [Category("P1")] - [Description("Test OVERSHOOT_Y. Check whether OVERSHOOT_Y returns expected value or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.Property.OVERSHOOT_Y A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRO")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void OVERSHOOT_Y_GET_VALUE() - { - /* TEST CODE */ - Assert.AreEqual(ANIMATABLE_PROPERTY_START_INDEX + 8, ScrollView.Property.OVERSHOOT_Y, "OVERSHOOT_Y shold be equals to the set value"); - } - - [Test] - [Category("P1")] - [Description("Test SCROLL_FINAL. Check whether SCROLL_FINAL returns expected value or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.Property.SCROLL_FINAL A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRO")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void SCROLL_FINAL_GET_VALUE() - { - /* TEST CODE */ - Assert.AreEqual(ANIMATABLE_PROPERTY_START_INDEX + 9, ScrollView.Property.SCROLL_FINAL, "SCROLL_FINAL shold be equals to the set value"); - } - - [Test] - [Category("P1")] - [Description("Test SCROLL_FINAL_X. Check whether SCROLL_FINAL_X returns expected value or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.Property.SCROLL_FINAL_X A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRO")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void SCROLL_FINAL_X_GET_VALUE() - { - /* TEST CODE */ - Assert.AreEqual(ANIMATABLE_PROPERTY_START_INDEX + 10, ScrollView.Property.SCROLL_FINAL_X, "SCROLL_FINAL_X shold be equals to the set value"); - } - - [Test] - [Category("P1")] - [Description("Test SCROLL_FINAL_Y. Check whether SCROLL_FINAL_Y returns expected value or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.Property.SCROLL_FINAL_Y A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRO")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void SCROLL_FINAL_Y_GET_VALUE() - { - /* TEST CODE */ - Assert.AreEqual(ANIMATABLE_PROPERTY_START_INDEX + 11, ScrollView.Property.SCROLL_FINAL_Y, "SCROLL_FINAL_Y shold be equals to the set value"); - } - - [Test] - [Category("P1")] - [Description("Test WRAP. Check whether WRAP returns expected value or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.Property.WRAP A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRO")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void WRAP_GET_VALUE() - { - /* TEST CODE */ - Assert.AreEqual(ANIMATABLE_PROPERTY_START_INDEX + 12, ScrollView.Property.WRAP, "WRAP shold be equals to the set value"); - } - - [Test] - [Category("P1")] - [Description("Test PANNING. Check whether PANNING returns expected value or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.Property.PANNING A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRO")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void PANNING_GET_VALUE() - { - /* TEST CODE */ - Assert.AreEqual(ANIMATABLE_PROPERTY_START_INDEX + 13, ScrollView.Property.PANNING, "PANNING shold be equals to the set value"); - } - - [Test] - [Category("P1")] - [Description("Test SCROLLING. Check whether SCROLLING returns expected value or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.Property.SCROLLING A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRO")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void SCROLLING_GET_VALUE() - { - /* TEST CODE */ - Assert.AreEqual(ANIMATABLE_PROPERTY_START_INDEX + 14, ScrollView.Property.SCROLLING, "SCROLLING shold be equals to the set value"); - } - - [Test] - [Category("P1")] - [Description("Test SCROLL_DOMAIN_SIZE. Check whether SCROLL_DOMAIN_SIZE returns expected value or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.Property.SCROLL_DOMAIN_SIZE A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRO")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void SCROLL_DOMAIN_SIZE_GET_VALUE() - { - /* TEST CODE */ - Assert.AreEqual(ANIMATABLE_PROPERTY_START_INDEX + 15, ScrollView.Property.SCROLL_DOMAIN_SIZE, "SCROLL_DOMAIN_SIZE shold be equals to the set value"); - } - - [Test] - [Category("P1")] - [Description("Test SCROLL_DOMAIN_SIZE_X. Check whether SCROLL_DOMAIN_SIZE_X returns expected value or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.Property.SCROLL_DOMAIN_SIZE_X A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRO")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void SCROLL_DOMAIN_SIZE_X_GET_VALUE() - { - /* TEST CODE */ - Assert.AreEqual(ANIMATABLE_PROPERTY_START_INDEX + 16, ScrollView.Property.SCROLL_DOMAIN_SIZE_X, "SCROLL_DOMAIN_SIZE_X shold be equals to the set value"); - } - - [Test] - [Category("P1")] - [Description("Test SCROLL_DOMAIN_SIZE_Y. Check whether SCROLL_DOMAIN_SIZE_Y returns expected value or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.Property.SCROLL_DOMAIN_SIZE_Y A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRO")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void SCROLL_DOMAIN_SIZE_Y_GET_VALUE() - { - /* TEST CODE */ - Assert.AreEqual(ANIMATABLE_PROPERTY_START_INDEX + 17, ScrollView.Property.SCROLL_DOMAIN_SIZE_Y, "SCROLL_DOMAIN_SIZE_Y shold be equals to the set value"); - } - - [Test] - [Category("P1")] - [Description("Test SCROLL_DOMAIN_OFFSET. Check whether SCROLL_DOMAIN_OFFSET returns expected value or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.Property.SCROLL_DOMAIN_OFFSET A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRO")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void SCROLL_DOMAIN_OFFSET_GET_VALUE() - { - /* TEST CODE */ - Assert.AreEqual(ANIMATABLE_PROPERTY_START_INDEX + 18, ScrollView.Property.SCROLL_DOMAIN_OFFSET, "SCROLL_DOMAIN_OFFSET shold be equals to the set value"); - } - - [Test] - [Category("P1")] - [Description("Test SCROLL_POSITION_DELTA. Check whether SCROLL_POSITION_DELTA returns expected value or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.Property.SCROLL_POSITION_DELTA A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRO")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void SCROLL_POSITION_DELTA_GET_VALUE() - { - /* TEST CODE */ - Assert.AreEqual(ANIMATABLE_PROPERTY_START_INDEX + 19, ScrollView.Property.SCROLL_POSITION_DELTA, "SCROLL_POSITION_DELTA shold be equals to the set value"); - } - - [Test] - [Category("P1")] - [Description("Test START_PAGE_POSITION. Check whether START_PAGE_POSITION returns expected value or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.Property.START_PAGE_POSITION A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRO")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void START_PAGE_POSITION_GET_VALUE() - { - /* TEST CODE */ - Assert.AreEqual(ANIMATABLE_PROPERTY_START_INDEX + 20, ScrollView.Property.START_PAGE_POSITION, "START_PAGE_POSITION shold be equals to the set value"); - } - } -} diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSScrollView.SnapEvent.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSScrollView.SnapEvent.cs deleted file mode 100755 index da7471a..0000000 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSScrollView.SnapEvent.cs +++ /dev/null @@ -1,119 +0,0 @@ -using NUnit.Framework; -using NUnit.Framework.TUnit; -using System; -using Tizen.NUI; -using Tizen.NUI.UIComponents; -using Tizen.NUI.BaseComponents; -using Tizen.NUI.Test; - -namespace Tizen.NUI.Tests -{ - [TestFixture] - [Description("Tizen.NUI.ScrollView.SnapEvent Tests")] - public class SnapEventTests - { - private string TAG = "NUI"; - - [SetUp] - public void Init() - { - Tizen.Log.Info(TAG, "Init() is called!"); - App.MainTitleChangeText("SnapEventTests"); - App.MainTitleChangeBackgroundColor(null); - } - - [TearDown] - public void Destroy() - { - Tizen.Log.Info(TAG, "Destroy() is called!"); - } - - [Test] - [Category("P1")] - [Description("Create a SnapEvent object. Check whether SnapEvent is successfully created or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.SnapEvent.SnapEvent C")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "CONSTR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void SnapEvent_INIT() - { - /* TEST CODE */ - var snapEvent = new ScrollView.SnapEvent(); - Assert.IsNotNull(snapEvent, "Can't create success object SnapEvent"); - Assert.IsInstanceOf(snapEvent, "Should be an instance of SnapEvent type."); - } - - [Test] - [Category("P1")] - [Description("Test position Check whether position is readable and writable.")] - [Property("SPEC", "Tizen.NUI.ScrollView.SnapEvent.position A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void position_SET_GET_VALUE() - { - /* TEST CODE */ - ScrollView.SnapEvent snapEvent = new ScrollView.SnapEvent(); - snapEvent.position = new Vector2(10.0f, 20.0f); - - Vector2 value = snapEvent.position; - Assert.AreEqual(10.0f, value.X, "Retrieved position should be equal to set value"); - Assert.AreEqual(20.0f, value.Y, "Retrieved position should be equal to set value"); - } - - [Test] - [Category("P1")] - [Description("Test GetSnapEventFromPtr Check whether GetSnapEventFromPtr works or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.SnapEvent.GetSnapEventFromPtr M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void GetSnapEventFromPtr_CHECK() - { - /* TEST CODE */ - global::System.IntPtr snapEvent = new global::System.IntPtr(); - var tmp = ScrollView.SnapEvent.GetSnapEventFromPtr(snapEvent); - Assert.IsInstanceOf(tmp); - } - - [Test] - [Category("P1")] - [Description("Test duration Check whether duration is readable and writable.")] - [Property("SPEC", "Tizen.NUI.ScrollView.SnapEvent.duration A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void duration_SET_GET_VALUE() - { - /* TEST CODE */ - ScrollView.SnapEvent snapEvent = new ScrollView.SnapEvent(); - snapEvent.duration = 4.0f; - - Assert.AreEqual(4.0f, snapEvent.duration, "Retrieved duration should be equal to set value"); - } - - - [Test] - [Category("P1")] - [Description("Test Dispose, try to dispose the SnapEvent.")] - [Property("SPEC", "Tizen.NUI.ScrollView.SnapEvent.Dispose M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR MCST")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void Dispose_CHECK_RETURN_TYPE() - { - /* TEST CODE */ - try - { - ScrollView.SnapEvent snapEvent = new ScrollView.SnapEvent(); - snapEvent.Dispose(); - } - catch (Exception e) - { - Tizen.Log.Error(TAG, "Caught Exception" + e.ToString()); - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); - Assert.Fail("Caught Exception" + e.ToString()); - } - } - } -} diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSScrollView.SnapStartedEventArgs.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSScrollView.SnapStartedEventArgs.cs deleted file mode 100755 index 2aad49d..0000000 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSScrollView.SnapStartedEventArgs.cs +++ /dev/null @@ -1,62 +0,0 @@ -using NUnit.Framework; -using NUnit.Framework.TUnit; -using System; -using Tizen.NUI; -using Tizen.NUI.UIComponents; -using Tizen.NUI.BaseComponents; -using Tizen.NUI.Test; - -namespace Tizen.NUI.Tests -{ - [TestFixture] - [Description("Tizen.NUI.ScrollView.SnapStartedEventArgs Tests")] - public class SnapStartedEventArgsTests - { - private string TAG = "NUI"; - - [SetUp] - public void Init() - { - Tizen.Log.Info(TAG, "Init() is called!"); - App.MainTitleChangeText("SnapStartedEventArgsTests"); - App.MainTitleChangeBackgroundColor(null); - } - - [TearDown] - public void Destroy() - { - Tizen.Log.Info(TAG, "Destroy() is called!"); - } - - [Test] - [Category("P1")] - [Description("Create a SnapStartedEventArgs object. Check whether SnapStartedEventArgs is successfully created or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.SnapStartedEventArgs.SnapStartedEventArgs C")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "CONSTR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void SnapStartedEventArgs_INIT() - { - /* TEST CODE */ - var snapStartedEventArgs = new ScrollView.SnapStartedEventArgs(); - Assert.IsNotNull(snapStartedEventArgs, "Can't create success object SnapStartedEventArgs"); - Assert.IsInstanceOf(snapStartedEventArgs, "Should be an instance of SnapStartedEventArgs type."); - } - - [Test] - [Category("P1")] - [Description("Test SnapEventInfo Check whether SnapEventInfo is readable and writable.")] - [Property("SPEC", "Tizen.NUI.ScrollView.SnapStartedEventArgs.SnapEventInfo A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void SnapEventInfo_SET_GET_VALUE() - { - /* TEST CODE */ - ScrollView.SnapStartedEventArgs snapStartedEventArgs = new ScrollView.SnapStartedEventArgs(); - ScrollView.SnapEvent snapEvent = new ScrollView.SnapEvent(); - snapStartedEventArgs.SnapEventInfo = snapEvent; - Assert.AreEqual(snapEvent, snapStartedEventArgs.SnapEventInfo, "Retrieved SnapEventInfo should be equal to set value"); - } - } -} diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSScrollView.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSScrollView.cs deleted file mode 100755 index 3ca1def..0000000 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSScrollView.cs +++ /dev/null @@ -1,1540 +0,0 @@ -using NUnit.Framework; -using NUnit.Framework.TUnit; -using System; -using Tizen.NUI; -using Tizen.NUI.BaseComponents; -using Tizen.NUI.Test; -using System.Threading.Tasks; - -namespace Tizen.NUI.Tests -{ - - [TestFixture] - [Description("Tizen.NUI.ScrollView Tests")] - public class ScrollViewTests - { - private string TAG = "NUI"; - private bool _flagSnapStarted; - - private void OnSnapStarted(object sender, EventArgs e) - { - _flagSnapStarted = true; - } - - [SetUp] - public void Init() - { - Tizen.Log.Info(TAG, "Init() is called!"); - App.MainTitleChangeText("ScrollViewTests"); - App.MainTitleChangeBackgroundColor(null); - } - - [TearDown] - public void Destroy() - { - Tizen.Log.Info(TAG, "Destroy() is called!"); - } - - [Test] - [Category("P1")] - [Description("dali ScrollView constructor test")] - [Property("SPEC", "Tizen.NUI.ScrollView.ScrollView C")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "CONSTR")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void ScrollView_INIT() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - Assert.IsInstanceOf(scrollView, "Should return ScrollView instance."); - } - - [Test] - [Category("P1")] - [Description("Test GetScrollSnapAlphaFunction whether GetScrollSnapAlphaFunction returns the value expected.")] - [Property("SPEC", "Tizen.NUI.ScrollView.GetScrollSnapAlphaFunction M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void GetScrollSnapAlphaFunction_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - scrollView.SetScrollSnapAlphaFunction(new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseIn)); - - AlphaFunction.BuiltinFunctions function = scrollView.GetScrollSnapAlphaFunction().GetBuiltinFunction(); - - Assert.AreEqual(function, AlphaFunction.BuiltinFunctions.EaseIn, "Should be equal."); - } - - [Test] - [Category("P1")] - [Description("Test SetScrollSnapAlphaFunction whether SetScrollSnapAlphaFunction returns the value expected.")] - [Property("SPEC", "Tizen.NUI.ScrollView.SetScrollSnapAlphaFunction M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void SetScrollSnapAlphaFunction_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - scrollView.SetScrollSnapAlphaFunction(new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseIn)); - - AlphaFunction.BuiltinFunctions function = scrollView.GetScrollSnapAlphaFunction().GetBuiltinFunction(); - - Assert.AreEqual(function, AlphaFunction.BuiltinFunctions.EaseIn, "Should be equal."); - } - - [Test] - [Category("P1")] - [Description("Test GetScrollFlickAlphaFunction whether GetScrollFlickAlphaFunction returns the value expected.")] - [Property("SPEC", "Tizen.NUI.ScrollView.GetScrollFlickAlphaFunction M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void GetScrollFlickAlphaFunction_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - scrollView.SetScrollFlickAlphaFunction(new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseIn)); - - AlphaFunction.BuiltinFunctions function = scrollView.GetScrollFlickAlphaFunction().GetBuiltinFunction(); - - Assert.AreEqual(function, AlphaFunction.BuiltinFunctions.EaseIn, "Should be equal."); - } - - [Test] - [Category("P1")] - [Description("Test SetScrollFlickAlphaFunction whether SetScrollFlickAlphaFunction returns the value expected.")] - [Property("SPEC", "Tizen.NUI.ScrollView.SetScrollFlickAlphaFunction M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void SetScrollFlickAlphaFunction_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - scrollView.SetScrollFlickAlphaFunction(new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseIn)); - - AlphaFunction.BuiltinFunctions function = scrollView.GetScrollFlickAlphaFunction().GetBuiltinFunction(); - - Assert.AreEqual(function, AlphaFunction.BuiltinFunctions.EaseIn, "Should be equal."); - } - - [Test] - [Category("P1")] - [Description("Test GetScrollSnapDuration whether GetScrollSnapDuration returns the value expected.")] - [Property("SPEC", "Tizen.NUI.ScrollView.GetScrollSnapDuration M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void GetScrollSnapDuration_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - scrollView.SetScrollSnapDuration(1.0f); - - float duration = scrollView.GetScrollSnapDuration(); - - Assert.AreEqual(1.0f, duration, "Should be equal."); - } - - [Test] - [Category("P1")] - [Description("Test SetScrollSnapDuration whether SetScrollSnapDuration returns the value expected.")] - [Property("SPEC", "Tizen.NUI.ScrollView.SetScrollSnapDuration M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void SetScrollSnapDuration_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - scrollView.SetScrollSnapDuration(1.0f); - - float duration = scrollView.GetScrollSnapDuration(); - - Assert.AreEqual(1.0f, duration, "Should be equal."); - } - - [Test] - [Category("P1")] - [Description("Test GetScrollFlickDuration whether GetScrollFlickDuration returns the value expected.")] - [Property("SPEC", "Tizen.NUI.ScrollView.GetScrollFlickDuration M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void GetScrollFlickDuration_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - scrollView.SetScrollFlickDuration(2.0f); - float duration = scrollView.GetScrollFlickDuration(); - Assert.AreEqual(2.0f, duration, "Should be equal."); - } - - [Test] - [Category("P1")] - [Description("Test SetScrollFlickDuration whether SetScrollFlickDuration returns the value expected.")] - [Property("SPEC", "Tizen.NUI.ScrollView.SetScrollFlickDuration M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void SetScrollFlickDuration_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - scrollView.SetScrollFlickDuration(2.0f); - float duration = scrollView.GetScrollFlickDuration(); - Assert.AreEqual(2.0f, duration, "Should be equal."); - } - - [Test] - [Category("P1")] - [Description("Test SetScrollSensitive whether SetScrollSensitive works or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.SetScrollSensitive M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void SetScrollSensitive_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - try - { - var scrollView = new ScrollView(); - scrollView.SetScrollSensitive(true); - } - catch (Exception e) - { - Tizen.Log.Error(TAG, "Caught Exception" + e.ToString()); - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); - Assert.Fail("Caught Exception" + e.ToString()); - } - } - - [Test] - [Category("P1")] - [Description("Test SetMaxOvershoot whether SetMaxOvershoot works or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.SetMaxOvershoot M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void SetMaxOvershoot_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - try - { - var scrollView = new ScrollView(); - scrollView.SetMaxOvershoot(50.0f, 50.0f); - } - catch (Exception e) - { - Tizen.Log.Error(TAG, "Caught Exception" + e.ToString()); - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); - Assert.Fail("Caught Exception" + e.ToString()); - } - } - - [Test] - [Category("P1")] - [Description("Test SetSnapOvershootAlphaFunction whether SetSnapOvershootAlphaFunction works or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.SetSnapOvershootAlphaFunction M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void SetSnapOvershootAlphaFunction_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - try - { - var scrollView = new ScrollView(); - scrollView.SetSnapOvershootAlphaFunction(new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseIn)); - } - catch (Exception e) - { - Tizen.Log.Error(TAG, "Caught Exception" + e.ToString()); - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); - Assert.Fail("Caught Exception" + e.ToString()); - } - } - - [Test] - [Category("P1")] - [Description("Test SetSnapOvershootDuration whether SetSnapOvershootDuration works or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.SetSnapOvershootDuration M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void SetSnapOvershootDuration_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - try - { - var scrollView = new ScrollView(); - scrollView.SetSnapOvershootDuration(5.0f); - } - catch (Exception e) - { - Tizen.Log.Error(TAG, "Caught Exception" + e.ToString()); - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); - Assert.Fail("Caught Exception" + e.ToString()); - } - } - - [Test] - [Category("P1")] - [Description("Test SetViewAutoSnap whether SetViewAutoSnap works or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.SetViewAutoSnap M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void SetViewAutoSnap_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - try - { - var scrollView = new ScrollView(); - scrollView.SetViewAutoSnap(true); - } - catch (Exception e) - { - Tizen.Log.Error(TAG, "Caught Exception" + e.ToString()); - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); - Assert.Fail("Caught Exception" + e.ToString()); - } - } - - [Test] - [Category("P1")] - [Description("Test SetWrapMode whether SetWrapMode works or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.SetWrapMode M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void SetWrapMode_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - try - { - var scrollView = new ScrollView(); - scrollView.SetWrapMode(true); - } - catch (Exception e) - { - Tizen.Log.Error(TAG, "Caught Exception" + e.ToString()); - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); - Assert.Fail("Caught Exception" + e.ToString()); - } - } - - [Test] - [Category("P1")] - [Description("Test GetScrollUpdateDistance whether GetScrollUpdateDistance returns the value expected.")] - [Property("SPEC", "Tizen.NUI.ScrollView.GetScrollUpdateDistance M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void GetScrollUpdateDistance_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - scrollView.SetScrollUpdateDistance(10); - - int distance = scrollView.GetScrollUpdateDistance(); - Assert.AreEqual(10, distance, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("Test SetScrollUpdateDistance whether SetScrollUpdateDistance works or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.SetScrollUpdateDistance M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void SetScrollUpdateDistance_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - try - { - var scrollView = new ScrollView(); - scrollView.SetScrollUpdateDistance(10); - } - catch (Exception e) - { - Tizen.Log.Error(TAG, "Caught Exception" + e.ToString()); - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); - Assert.Fail("Caught Exception" + e.ToString()); - } - } - - [Test] - [Category("P1")] - [Description("Test GetAxisAutoLock whether GetAxisAutoLock returns the value expected.")] - [Property("SPEC", "Tizen.NUI.ScrollView.GetAxisAutoLock M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void GetAxisAutoLock_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - scrollView.SetAxisAutoLock(true); - - bool isAutoLock = scrollView.GetAxisAutoLock(); - Assert.AreEqual(true, isAutoLock, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("Test SetAxisAutoLock whether SetAxisAutoLock works or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.SetAxisAutoLock M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void SetAxisAutoLock_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - try - { - var scrollView = new ScrollView(); - scrollView.SetAxisAutoLock(true); - } - catch (Exception e) - { - Tizen.Log.Error(TAG, "Caught Exception" + e.ToString()); - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); - Assert.Fail("Caught Exception" + e.ToString()); - } - } - - [Test] - [Category("P1")] - [Description("Test GetAxisAutoLockGradient whether GetAxisAutoLockGradient returns the value expected.")] - [Property("SPEC", "Tizen.NUI.ScrollView.GetAxisAutoLockGradient M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void GetAxisAutoLockGradient_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - scrollView.SetAxisAutoLockGradient(1.0f); - - float gradient = scrollView.GetAxisAutoLockGradient(); - Assert.AreEqual(1.0f, gradient, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("Test SetAxisAutoLockGradient whether SetAxisAutoLockGradient works or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.SetAxisAutoLockGradient M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void SetAxisAutoLockGradient_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - try - { - var scrollView = new ScrollView(); - scrollView.SetAxisAutoLockGradient(1.0f); - } - catch (Exception e) - { - Tizen.Log.Error(TAG, "Caught Exception" + e.ToString()); - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); - Assert.Fail("Caught Exception" + e.ToString()); - } - } - - [Test] - [Category("P1")] - [Description("Test GetFrictionCoefficient whether GetFrictionCoefficient returns the value expected.")] - [Property("SPEC", "Tizen.NUI.ScrollView.GetFrictionCoefficient M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void GetFrictionCoefficient_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - scrollView.SetFrictionCoefficient(1.0f); - - float coefficient = scrollView.GetFrictionCoefficient(); - Assert.AreEqual(1.0f, coefficient, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("Test SetFrictionCoefficient whether SetFrictionCoefficient works or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.SetFrictionCoefficient M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void SetFrictionCoefficient_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - try - { - var scrollView = new ScrollView(); - scrollView.SetFrictionCoefficient(1.0f); - } - catch (Exception e) - { - Tizen.Log.Error(TAG, "Caught Exception" + e.ToString()); - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); - Assert.Fail("Caught Exception" + e.ToString()); - } - } - - [Test] - [Category("P1")] - [Description("Test GetFlickSpeedCoefficient whether GetFlickSpeedCoefficient returns the value expected.")] - [Property("SPEC", "Tizen.NUI.ScrollView.GetFlickSpeedCoefficient M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void GetFlickSpeedCoefficient_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - scrollView.SetFlickSpeedCoefficient(0.7f); - float coefficient = scrollView.GetFlickSpeedCoefficient(); - Assert.Less(Math.Abs(0.7 - coefficient), 0.001f, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("Test SetFlickSpeedCoefficient whether SetFlickSpeedCoefficient works or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.SetFlickSpeedCoefficient M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void SetFlickSpeedCoefficient_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - try - { - var scrollView = new ScrollView(); - scrollView.SetFlickSpeedCoefficient(0.7f); - } - catch (Exception e) - { - Tizen.Log.Error(TAG, "Caught Exception" + e.ToString()); - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); - Assert.Fail("Caught Exception" + e.ToString()); - } - } - - [Test] - [Category("P1")] - [Description("Test GetMinimumDistanceForFlick whether GetMinimumDistanceForFlick returns the value expected.")] - [Property("SPEC", "Tizen.NUI.ScrollView.GetMinimumDistanceForFlick M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void GetMinimumDistanceForFlick_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - scrollView.SetMinimumDistanceForFlick(new Vector2(30.0f, 15.0f)); - - Vector2 distance = scrollView.GetMinimumDistanceForFlick(); - Assert.AreEqual(30.0f, distance.X, "Should be equal!"); - Assert.AreEqual(15.0f, distance.Y, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("Test SetMinimumDistanceForFlick whether SetMinimumDistanceForFlick works or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.SetMinimumDistanceForFlick M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void SetMinimumDistanceForFlick_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - try - { - var scrollView = new ScrollView(); - scrollView.SetMinimumDistanceForFlick(new Vector2(30.0f, 15.0f)); - } - catch (Exception e) - { - Tizen.Log.Error(TAG, "Caught Exception" + e.ToString()); - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); - Assert.Fail("Caught Exception" + e.ToString()); - } - } - - [Test] - [Category("P1")] - [Description("Test GetMinimumSpeedForFlick whether GetMinimumSpeedForFlick returns the value expected.")] - [Property("SPEC", "Tizen.NUI.ScrollView.GetMinimumSpeedForFlick M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void GetMinimumSpeedForFlick_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - scrollView.SetMinimumDistanceForFlick(new Vector2(30.0f, 15.0f)); - - Vector2 distance = scrollView.GetMinimumDistanceForFlick(); - Assert.AreEqual(30.0f, distance.X, "Should be equal!"); - Assert.AreEqual(15.0f, distance.Y, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("Test SetMinimumSpeedForFlick whether SetMinimumSpeedForFlick works or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.SetMinimumSpeedForFlick M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void SetMinimumSpeedForFlick_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - try - { - var scrollView = new ScrollView(); - scrollView.SetFlickSpeedCoefficient(500); - } - catch (Exception e) - { - Tizen.Log.Error(TAG, "Caught Exception" + e.ToString()); - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); - Assert.Fail("Caught Exception" + e.ToString()); - } - } - - [Test] - [Category("P1")] - [Description("Test GetMaxFlickSpeed whether GetMaxFlickSpeed returns the value expected.")] - [Property("SPEC", "Tizen.NUI.ScrollView.GetMaxFlickSpeed M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void GetMaxFlickSpeed_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - scrollView.SetMaxFlickSpeed(500); - - float speed = scrollView.GetMaxFlickSpeed(); - Assert.AreEqual(500, speed, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("Test SetMaxFlickSpeed whether SetMaxFlickSpeed works or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.SetMaxFlickSpeed M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void SetMaxFlickSpeed_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - try - { - var scrollView = new ScrollView(); - scrollView.SetMaxFlickSpeed(0.5f); - } - catch (Exception e) - { - Tizen.Log.Error(TAG, "Caught Exception" + e.ToString()); - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); - Assert.Fail("Caught Exception" + e.ToString()); - } - } - - [Test] - [Category("P1")] - [Description("Test GetWheelScrollDistanceStep whether GetWheelScrollDistanceStep returns the value expected.")] - [Property("SPEC", "Tizen.NUI.ScrollView.GetWheelScrollDistanceStep M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void GetWheelScrollDistanceStep_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - scrollView.SetWheelScrollDistanceStep(new Vector2(30.0f, 15.0f)); - - Vector2 step = scrollView.GetWheelScrollDistanceStep(); - Assert.AreEqual(30.0f, step.X, "Should be equal!"); - Assert.AreEqual(15.0f, step.Y, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("Test SetWheelScrollDistanceStep whether SetWheelScrollDistanceStep works or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.SetWheelScrollDistanceStep M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void SetWheelScrollDistanceStep_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - try - { - var scrollView = new ScrollView(); - scrollView.SetWheelScrollDistanceStep(new Vector2(30.0f, 15.0f)); - } - catch (Exception e) - { - Tizen.Log.Error(TAG, "Caught Exception" + e.ToString()); - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); - Assert.Fail("Caught Exception" + e.ToString()); - } - } - - [Test] - [Category("P1")] - [Description("Test GetCurrentScrollPosition whether GetCurrentScrollPosition returns the value expected.")] - [Property("SPEC", "Tizen.NUI.ScrollView.GetCurrentScrollPosition M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void GetCurrentScrollPosition_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - Vector2 position = scrollView.GetCurrentScrollPosition(); - Assert.AreEqual(0.0f, position.X, "Should be equal!"); - Assert.AreEqual(0.0f, position.Y, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("Test GetCurrentPage whether GetCurrentPage returns the value expected.")] - [Property("SPEC", "Tizen.NUI.ScrollView.GetCurrentPage M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void GetCurrentPage_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - - uint page = scrollView.GetCurrentPage(); - Assert.AreEqual(0, page, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("Test ScrollTo whether ScrollTo returns the value expected.")] - [Property("SPEC", "Tizen.NUI.ScrollView.ScrollTo M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("COVPARAM", "Vector2")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void ScrollTo_CHECK_RETURN_VALUE_WITH_VECTOR2() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - Window.Instance.Add(scrollView); - - Vector2 target = new Vector2(0, 0); - scrollView.ScrollTo(target); - Vector2 position = scrollView.GetCurrentScrollPosition(); - Assert.AreEqual(0, position.X, "Should be equal!"); - Assert.AreEqual(0, position.Y, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("Test ScrollTo whether ScrollTo returns the value expected.")] - [Property("SPEC", "Tizen.NUI.ScrollView.ScrollTo M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("COVPARAM", "Vector2, Single")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void ScrollTo_CHECK_RETURN_VALUE_WITH_VECTOR2_Single() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - Window.Instance.Add(scrollView); - - Vector2 target = new Vector2(0, 0); - - scrollView.ScrollTo(target, 0.0f); - Vector2 position = scrollView.GetCurrentScrollPosition(); - Assert.AreEqual(0, position.X, "Should be equal!"); - Assert.AreEqual(0, position.Y, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("Test ScrollTo whether ScrollTo returns the value expected.")] - [Property("SPEC", "Tizen.NUI.ScrollView.ScrollTo M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("COVPARAM", "Vector2, Single, AlphaFunction")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void ScrollTo_CHECK_RETURN_VALUE_WITH_VECTOR2_Single_ALPHAFUNCTION() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - Window.Instance.Add(scrollView); - - Vector2 target = new Vector2(0, 0); - - scrollView.ScrollTo(target, 0.5f, new AlphaFunction(AlphaFunction.BuiltinFunctions.Linear)); - Vector2 position = scrollView.GetCurrentScrollPosition(); - Assert.AreEqual(0, position.X, "Should be equal!"); - Assert.AreEqual(0, position.Y, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("Test ScrollTo whether ScrollTo returns the value expected.")] - [Property("SPEC", "Tizen.NUI.ScrollView.ScrollTo M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("COVPARAM", "Vector2, Single, DirectionBias, DirectionBias")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void ScrollTo_CHECK_RETURN_VALUE_WITH_VECTOR2_Single_DIRECTIONBIAS_DIRECTIONBIAS() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - Window.Instance.Add(scrollView); - - Vector2 target = new Vector2(0, 0); - - scrollView.ScrollTo(target, 0.25f, DirectionBias.DirectionBiasLeft, DirectionBias.DirectionBiasLeft); - Vector2 position = scrollView.GetCurrentScrollPosition(); - Assert.AreEqual(0, position.X, "Should be equal!"); - Assert.AreEqual(0, position.Y, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("Test ScrollTo whether ScrollTo returns the value expected.")] - [Property("SPEC", "Tizen.NUI.ScrollView.ScrollTo M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("COVPARAM", "Vector2, Single, AlphaFunction, DirectionBias, DirectionBias")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void ScrollTo_CHECK_RETURN_VALUE_WITH_VECTOR2_Single_ALPHAFUNCTION_DIRECTIONBIAS_DIRECTIONBIAS() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - Window.Instance.Add(scrollView); - - Vector2 target = new Vector2(0, 0); - - scrollView.ScrollTo(target, 0.25f, new AlphaFunction(AlphaFunction.BuiltinFunctions.Linear), DirectionBias.DirectionBiasLeft, DirectionBias.DirectionBiasLeft); - Vector2 position = scrollView.GetCurrentScrollPosition(); - Assert.AreEqual(0, position.X, "Should be equal!"); - Assert.AreEqual(0, position.Y, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("Test ScrollTo whether ScrollTo returns the value expected.")] - [Property("SPEC", "Tizen.NUI.ScrollView.ScrollTo M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("COVPARAM", "uint")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void ScrollTo_CHECK_RETURN_VALUE_WITH_UINT() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - Window.Instance.Add(scrollView); - - scrollView.ScrollTo(0); - Vector2 position = scrollView.GetCurrentScrollPosition(); - Assert.AreEqual(0.0f, position.X, "Should be equal!"); - Assert.AreEqual(0.0f, position.Y, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("Test ScrollTo whether ScrollTo returns the value expected.")] - [Property("SPEC", "Tizen.NUI.ScrollView.ScrollTo M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("COVPARAM", "uint, Single")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void ScrollTo_CHECK_RETURN_VALUE_WITH_UINT_Single() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - Window.Instance.Add(scrollView); - - scrollView.ScrollTo(0, 0.0f); - Vector2 position = scrollView.GetCurrentScrollPosition(); - Assert.AreEqual(0, position.X, "Should be equal!"); - Assert.AreEqual(0.0f, position.Y, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("Test ScrollTo whether ScrollTo returns the value expected.")] - [Property("SPEC", "Tizen.NUI.ScrollView.ScrollTo M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("COVPARAM", "uint, Single, DirectionBias")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void ScrollTo_CHECK_RETURN_VALUE_WITH_UINT_Single_DIRECTIONBIAS() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - Window.Instance.Add(scrollView); - - scrollView.ScrollTo(0, 0.0f, DirectionBias.DirectionBiasLeft); - Vector2 position = scrollView.GetCurrentScrollPosition(); - Assert.AreEqual(0.0f, position.X, "Should be equal!"); - Assert.AreEqual(0.0f, position.Y, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("Test ScrollTo whether ScrollTo returns the value expected.")] - [Property("SPEC", "Tizen.NUI.ScrollView.ScrollTo M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("COVPARAM", "View")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void ScrollTo_CHECK_RETURN_VALUE_WITH_VIEW() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - Window.Instance.Add(scrollView); - - View view = new View(); - view.Position = new Position(0.0f, 0.0f, 0.0f); - scrollView.Add(view); - - - scrollView.ScrollTo(view); - Vector2 position = scrollView.GetCurrentScrollPosition(); - Assert.AreEqual(0.0f, position.X, "Should be equal!"); - Assert.AreEqual(0.0f, position.Y, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("Test ScrollTo whether ScrollTo returns the value expected.")] - [Property("SPEC", "Tizen.NUI.ScrollView.ScrollTo M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("COVPARAM", "View, Single")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void ScrollTo_CHECK_RETURN_VALUE_WITH_VIEW_Single() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - Window.Instance.Add(scrollView); - - View view = new View(); - view.Position = new Position(0.0f, 0.0f, 0.0f); - scrollView.Add(view); - - - scrollView.ScrollTo(view, 0.0f); - Vector2 position = scrollView.GetCurrentScrollPosition(); - Assert.AreEqual(0.0f, position.X, "Should be equal!"); - Assert.AreEqual(0.0f, position.Y, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("Test ScrollToSnapPoint whether ScrollToSnapPoint returns the value expected.")] - [Property("SPEC", "Tizen.NUI.ScrollView.ScrollToSnapPoint M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void ScrollToSnapPoint_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - Window.Instance.Add(scrollView); - Assert.True(scrollView.ScrollToSnapPoint(), "Should be false!"); - } - - [Test] - [Category("P1")] - [Description("Test RemoveAllEffects whether RemoveAllEffects works or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.RemoveAllEffects M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void RemoveAllEffects_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - try - { - var scrollView = new ScrollView(); - Window.Instance.Add(scrollView); - scrollView.RemoveAllEffects(); - } - catch (Exception e) - { - Tizen.Log.Error(TAG, "Caught Exception" + e.ToString()); - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); - Assert.Fail("Caught Exception" + e.ToString()); - } - } - - [Test] - [Category("P1")] - [Description("Test BindView whether BindView returns the value expected.")] - [Property("SPEC", "Tizen.NUI.ScrollView.BindView M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void BindView_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - try - { - var scrollView = new ScrollView(); - Window.Instance.Add(scrollView); - - View view = new View(); - view.Position = new Position(100.0f, 100.0f, 0.0f); - scrollView.Add(view); - - scrollView.BindView(view); - } - catch (Exception e) - { - Tizen.Log.Error(TAG, "Caught Exception" + e.ToString()); - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); - Assert.Fail("Caught Exception" + e.ToString()); - } - } - - [Test] - [Category("P1")] - [Description("Test UnbindView whether UnbindView works or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.UnbindView M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void UnbindView_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - try - { - var scrollView = new ScrollView(); - Window.Instance.Add(scrollView); - - View view = new View(); - view.Position = new Position(100.0f, 100.0f, 0.0f); - scrollView.Add(view); - - scrollView.BindView(view); - scrollView.UnbindView(view); - } - catch (Exception e) - { - Tizen.Log.Error(TAG, "Caught Exception" + e.ToString()); - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); - Assert.Fail("Caught Exception" + e.ToString()); - } - } - - [Test] - [Category("P1")] - [Description("Test SetScrollingDirection whether SetScrollingDirection works or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.SetScrollingDirection M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("COVPARAM", "Radian, Radian")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void SetScrollingDirection_CHECK_RETURN_VALUE_WITH_RADIAN_RADIAN() - { - /* TEST CODE */ - try - { - var scrollView = new ScrollView(); - Window.Instance.Add(scrollView); - - scrollView.SetScrollingDirection(new Radian(3.0f), new Radian(3.0f)); - } - catch (Exception e) - { - Tizen.Log.Error(TAG, "Caught Exception" + e.ToString()); - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); - Assert.Fail("Caught Exception" + e.ToString()); - } - } - - [Test] - [Category("P1")] - [Description("Test SetScrollingDirection whether SetScrollingDirection works or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.SetScrollingDirection M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("COVPARAM", "Radian")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void SetScrollingDirection_CHECK_RETURN_VALUE_WITH_RADIAN() - { - /* TEST CODE */ - try - { - var scrollView = new ScrollView(); - Window.Instance.Add(scrollView); - - scrollView.SetScrollingDirection(new Radian(3.0f)); - } - catch (Exception e) - { - Tizen.Log.Error(TAG, "Caught Exception" + e.ToString()); - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); - Assert.Fail("Caught Exception" + e.ToString()); - } - } - - [Test] - [Category("P1")] - [Description("Test RemoveScrollingDirection whether RemoveScrollingDirection works or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.RemoveScrollingDirection M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void RemoveScrollingDirection_CHECK_RETURN_VALUE_WITH_RADIAN() - { - /* TEST CODE */ - try - { - var scrollView = new ScrollView(); - Window.Instance.Add(scrollView); - Radian radian = new Radian(3.0f); - - scrollView.SetScrollingDirection(radian); - scrollView.RemoveScrollingDirection(radian); - } - catch (Exception e) - { - Tizen.Log.Error(TAG, "Caught Exception" + e.ToString()); - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); - Assert.Fail("Caught Exception" + e.ToString()); - } - } - - [Test] - [Category("P1")] - [Description("dali scrollView WrapEnabled test, Check whether WrapEnabled is readable and writable.")] - [Property("SPEC", "Tizen.NUI.ScrollView.WrapEnabled A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void WrapEnabled_SET_GET_VALUE() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - scrollView.WrapEnabled = false; - Assert.AreEqual(false, scrollView.WrapEnabled, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("dali scrollView PanningEnabled test, Check whether PanningEnabled is readable and writable.")] - [Property("SPEC", "Tizen.NUI.ScrollView.PanningEnabled A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void PanningEnabled_SET_GET_VALUE() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - scrollView.PanningEnabled = false; - Assert.AreEqual(false, scrollView.PanningEnabled, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("dali scrollView AxisAutoLockEnabled test, Check whether AxisAutoLockEnabled is readable and writable.")] - [Property("SPEC", "Tizen.NUI.ScrollView.AxisAutoLockEnabled A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void AxisAutoLockEnabled_SET_GET_VALUE() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - scrollView.AxisAutoLockEnabled = true; - Assert.IsTrue(scrollView.AxisAutoLockEnabled, "Should be true!"); - } - - [Test] - [Category("P1")] - [Description("dali scrollView WheelScrollDistanceStep test, Check whether WheelScrollDistanceStep is readable and writable.")] - [Property("SPEC", "Tizen.NUI.ScrollView.WheelScrollDistanceStep A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void WheelScrollDistanceStep_SET_GET_VALUE() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - Vector2 step = new Vector2(100.0f, 50.0f); - scrollView.WheelScrollDistanceStep = step; - - Vector2 value = scrollView.WheelScrollDistanceStep; - Assert.AreEqual(100.0f, value.X, "Should be equal!"); - Assert.AreEqual(50.0f, value.Y, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("dali scrollView ScrollPosition test, Check whether ScrollPosition is readable and writable.")] - [Property("SPEC", "Tizen.NUI.ScrollView.ScrollPosition A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void ScrollPosition_SET_GET_VALUE() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - scrollView.ScrollPosition = new Vector2(320.0f, 550.0f); - - Vector2 value = scrollView.ScrollPosition; - Assert.AreEqual(320.0f, value.X, "Should be equal!"); - Assert.AreEqual(550.0f, value.Y, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("dali scrollView ScrollPrePosition test, Check whether ScrollPrePosition is readable and writable.")] - [Property("SPEC", "Tizen.NUI.ScrollView.ScrollPrePosition A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void ScrollPrePosition_SET_GET_VALUE() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - scrollView.ScrollPrePosition = new Vector2(300.0f, 500.0f); - - Vector2 value = scrollView.ScrollPrePosition; - Assert.AreEqual(300.0f, value.X, "Should be equal!"); - Assert.AreEqual(500.0f, value.Y, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("dali scrollView ScrollPrePositionMax test, Check whether ScrollPrePositionMax is readable and writable.")] - [Property("SPEC", "Tizen.NUI.ScrollView.ScrollPrePositionMax A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void ScrollPrePositionMax_SET_GET_VALUE() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - scrollView.ScrollPrePositionMax = new Vector2(300.0f, 500.0f); - - Vector2 value = scrollView.ScrollPrePositionMax; - Assert.AreEqual(300.0f, value.X, "Should be equal!"); - Assert.AreEqual(500.0f, value.Y, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("dali scrollView OvershootX test, Check whether OvershootX is readable and writable.")] - [Property("SPEC", "Tizen.NUI.ScrollView.OvershootX A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void OvershootX_SET_GET_VALUE() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - scrollView.OvershootX = 0.8f; - Assert.AreEqual(0.8f, scrollView.OvershootX, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("dali scrollView OvershootY test, Check whether OvershootY is readable and writable.")] - [Property("SPEC", "Tizen.NUI.ScrollView.OvershootY A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void OvershootY_SET_GET_VALUE() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - scrollView.OvershootY = 0.8f; - Assert.AreEqual(0.8f, scrollView.OvershootY, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("dali scrollView ScrollFinal test, Check whether ScrollFinal is readable and writable.")] - [Property("SPEC", "Tizen.NUI.ScrollView.ScrollFinal A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void ScrollFinal_SET_GET_VALUE() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - scrollView.ScrollFinal = new Vector2(500.0f, 200.0f); - Assert.AreEqual(500.0f, scrollView.ScrollFinal.Width, "Should be equal!"); - Assert.AreEqual(200.0f, scrollView.ScrollFinal.Height, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("dali scrollView Wrap test, Check whether Wrap is readable and writable.")] - [Property("SPEC", "Tizen.NUI.ScrollView.Wrap A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void Wrap_SET_GET_VALUE() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - scrollView.Wrap = false; - Assert.AreEqual(false, scrollView.Wrap, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("dali scrollView Panning test, Check whether Panning is readable and writable.")] - [Property("SPEC", "Tizen.NUI.ScrollView.Panning A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void Panning_SET_GET_VALUE() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - scrollView.Panning = false; - Assert.AreEqual(false, scrollView.Panning, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("dali scrollView Scrolling test, Check whether Scrolling is readable and writable.")] - [Property("SPEC", "Tizen.NUI.ScrollView.Scrolling A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void Scrolling_SET_GET_VALUE() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - scrollView.Scrolling = false; - - Assert.AreEqual(false, scrollView.Scrolling, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("dali scrollView ScrollDomainSize test, Check whether ScrollDomainSize is readable and writable.")] - [Property("SPEC", "Tizen.NUI.ScrollView.ScrollDomainSize A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void ScrollDomainSize_SET_GET_VALUE() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - scrollView.ScrollDomainSize = new Vector2(500.0f, 200.0f); - Assert.AreEqual(500.0f, scrollView.ScrollDomainSize.Width, "Should be equal!"); - Assert.AreEqual(200.0f, scrollView.ScrollDomainSize.Height, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("dali scrollView ScrollDomainOffset test, Check whether ScrollDomainOffset is readable and writable.")] - [Property("SPEC", "Tizen.NUI.ScrollView.ScrollDomainOffset A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void ScrollDomainOffset_SET_GET_VALUE() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - scrollView.ScrollDomainOffset = new Vector2(500.0f, 200.0f); - Assert.AreEqual(500.0f, scrollView.ScrollDomainOffset.Width, "Should be equal!"); - Assert.AreEqual(200.0f, scrollView.ScrollDomainOffset.Height, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("dali scrollView ScrollPositionDelta test, Check whether ScrollPositionDelta is readable and writable.")] - [Property("SPEC", "Tizen.NUI.ScrollView.ScrollPositionDelta A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void ScrollPositionDelta_SET_GET_VALUE() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - - scrollView.ScrollPositionDelta = new Vector2(10.0f, 30.0f); - Vector2 position = scrollView.ScrollPositionDelta; - - Assert.AreEqual(10, position.X, "Should be equal!"); - Assert.AreEqual(30, position.Y, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("dali scrollView StartPagePosition test, Check whether StartPagePosition is readable and writable.")] - [Property("SPEC", "Tizen.NUI.ScrollView.StartPagePosition A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void StartPagePosition_SET_GET_VALUE() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - scrollView.StartPagePosition = new Vector3(0, 0, 0); - Vector3 position = scrollView.StartPagePosition; - - Assert.AreEqual(0, position.X, "Should be equal!"); - Assert.AreEqual(0, position.Y, "Should be equal!"); - Assert.AreEqual(0, position.Z, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("dali scrollView ScrollMode test, Check whether ScrollMode is readable and writable.")] - [Property("SPEC", "Tizen.NUI.ScrollView.ScrollMode A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void ScrollMode_SET_GET_VALUE() - { - /* TEST CODE */ - var scrollView = new ScrollView(); - PropertyMap map = new PropertyMap(); - map.Add((int)ScrollModeType.XAxisScrollEnabled, new PropertyValue(true)); - scrollView.ScrollMode = map; - - Assert.AreEqual(false, scrollView.Scrolling, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("Test Dispose, try to dispose the ScrollBar.")] - [Property("SPEC", "Tizen.NUI.ScrollView.Dispose M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR MCST")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void Dispose_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - try - { - ScrollView scrollView = new ScrollView(); - scrollView.Dispose(); - } - catch (Exception e) - { - Tizen.Log.Error(TAG, "Caught Exception" + e.ToString()); - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); - Assert.Fail("Caught Exception" + e.ToString()); - } - } - - [Test] - [Category("P1")] - [Description("Test ApplyEffect whether works or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.ApplyEffect M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void ApplyEffect_CHECK() - { - var scrollView = new ScrollView(); - Assert.IsInstanceOf(scrollView, "Should be an instance of ScrollView type."); - Window.Instance.Add(scrollView); - /* TEST CODE */ - try - { - Path path = new Path(); - ScrollViewEffect scrollViewEffect = new ScrollViewPagePathEffect(path, new Vector3(-1.0f, 0, 0), ScrollView.Property.SCROLL_FINAL_X, new Vector3(100.0f, 100.0f, 0.0f), 2); - scrollView.ApplyEffect(scrollViewEffect); - } - catch (Exception e) - { - Tizen.Log.Error(TAG, "Caught Exception" + e.ToString()); - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); - Assert.Fail("Caught Exception" + e.ToString()); - } - finally - { - Window.Instance.Remove(scrollView); - } - } - - [Test] - [Category("P1")] - [Description("Test RemoveEffect whether works or not.")] - [Property("SPEC", "Tizen.NUI.ScrollView.RemoveEffect M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void RemoveEffect_CHECK() - { - var scrollView = new ScrollView(); - Assert.IsInstanceOf(scrollView, "Should be an instance of ScrollView type."); - Window.Instance.Add(scrollView); - /* TEST CODE */ - try - { - Path path = new Path(); - ScrollViewEffect scrollViewEffect = new ScrollViewPagePathEffect(path, new Vector3(-1.0f, 0, 0), ScrollView.Property.SCROLL_FINAL_X, new Vector3(100.0f, 100.0f, 0.0f), 2); - scrollView.ApplyEffect(scrollViewEffect); - scrollView.RemoveEffect(scrollViewEffect); - } - catch (Exception e) - { - Tizen.Log.Error(TAG, "Caught Exception" + e.ToString()); - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); - Assert.Fail("Caught Exception" + e.ToString()); - } - finally - { - Window.Instance.Remove(scrollView); - } - } - - [Test] - [Category("P1")] - [Description("Test SnapStarted. Test whether the SnapStarted event will be triggered.")] - [Property("SPEC", "Tizen.NUI.ScrollView.SnapStarted E")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "EVL")] - [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")] - public async Task SnapStarted_CHECK_EVENT() - { - /*TEST CODE*/ - var scrollView = new ScrollView(); - Assert.IsInstanceOf(scrollView, "Should be an instance of ScrollView type."); - scrollView.Size2D = new Size2D(400, 400); - Window.Instance.Add(scrollView); - try - { - _flagSnapStarted = false; - Assert.False(_flagSnapStarted, "_flagSnapStarted should false initial"); - scrollView.SnapStarted += OnSnapStarted; - scrollView.ScrollTo(new Vector2(300, 100), 0.0f); - await Task.Delay(100); - Assert.True(_flagSnapStarted, "_flagSnapStarted should be true."); - } - catch (Exception e) - { - Tizen.Log.Error(TAG, "Caught Exception" + e.ToString()); - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); - Assert.Fail("Caught Exception" + e.ToString()); - } - finally - { - scrollView.SnapStarted -= OnSnapStarted; - Window.Instance.Remove(scrollView); - } - } - } -} diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSScrollViewEffect.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSScrollViewEffect.cs deleted file mode 100755 index fbfb3be..0000000 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSScrollViewEffect.cs +++ /dev/null @@ -1,69 +0,0 @@ -using NUnit.Framework; -using NUnit.Framework.TUnit; -using System; -using Tizen.NUI; -using Tizen.NUI.UIComponents; -using Tizen.NUI.Test; - -namespace Tizen.NUI.Tests -{ - [TestFixture] - [Description("Tizen.NUI.ScrollViewEffect Tests")] - public class ScrollViewEffectTests - { - private string TAG = "NUI"; - - [SetUp] - public void Init() - { - Tizen.Log.Info(TAG, "Init() is called!"); - App.MainTitleChangeText("Tests"); - App.MainTitleChangeBackgroundColor(null); - } - - [TearDown] - public void Destroy() - { - Tizen.Log.Info(TAG, "Destroy() is called!"); - } - - [Test] - [Category("P1")] - [Description("Create a scrollViewEffectButton object.Check whether object is successfully created or not.")] - [Property("SPEC", "Tizen.NUI.ScrollViewEffect.ScrollViewEffect C")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "CONSTR")] - [Property("AUTHOR", "Wu Youxia, youxia.wu@partner.samsung.com")] - public void ScrollViewEffect_INIT() - { - /* TEST CODE */ - var scrollViewEffect = new ScrollViewEffect(); - - Assert.IsNotNull(scrollViewEffect, "Can't create success object ScrollViewEffect"); - Assert.IsInstanceOf(scrollViewEffect, "Should be an instance of ScrollViewEffect type."); - } - - [Test] - [Category("P1")] - [Description("Test Dispose, try to dispose the ScrollViewEffect.")] - [Property("SPEC", "Tizen.NUI.ScrollViewEffect.Dispose M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR MCST")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void Dispose_CHECK_RETURN_TYPE() - { - /* TEST CODE */ - try - { - ScrollViewEffect ScrollViewEffect = new ScrollViewEffect(); - ScrollViewEffect.Dispose(); - } - catch (Exception e) - { - Tizen.Log.Error(TAG, "Caught Exception" + e.ToString()); - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); - Assert.Fail("Caught Exception" + e.ToString()); - } - } - } -} diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSSlider.MarkReachedEventArgs.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSSlider.MarkReachedEventArgs.cs deleted file mode 100755 index ccb6acf..0000000 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSSlider.MarkReachedEventArgs.cs +++ /dev/null @@ -1,75 +0,0 @@ -using NUnit.Framework; -using NUnit.Framework.TUnit; -using System; -using Tizen.NUI; -using Tizen.NUI.UIComponents; -using System.Threading; - -namespace Tizen.NUI.Tests -{ - [TestFixture] - [Description("Tizen.NUI.UIComponents.Slider.ValueChangedEventArgs Tests")] - public class MarkReachedEventArgsTests - { - [SetUp] - public void Init() - { - - } - - [TearDown] - public void Destroy() - { - - } - - [Test] - [Category("P1")] - [Description("Test MarkReachedEventArgs. Check Mark Reached Event Arguments .")] - [Property("SPEC", "Tizen.NUI.UIComponents.Slider.MarkReachedEventArgs.MarkReachedEventArgs C")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "CONSTR")] - [Property("AUTHOR", "Xuemei Chen, xnicole.chen@samsung.com")] - public void MarkReachedEventArgs_INIT() - { - var eventArgs = new Slider.MarkReachedEventArgs(); - Assert.IsInstanceOf(eventArgs, "MarkReachedEventArgs construct fail."); - - } - - [Test] - [Category("P1")] - [Description("Update Slider in Mark Reached Event Arguments.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Slider.MarkReachedEventArgs.Slider A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Xuemei Chen, xnicole.chen@samsung.com")] - public void Slider_SET_GET_VALUE() - { - Slider.MarkReachedEventArgs eventArgs = new Slider.MarkReachedEventArgs(); - Slider slider = new Slider(); - slider.Name = "test slider"; - eventArgs.Slider = slider; - Assert.AreEqual("test slider", eventArgs.Slider.Name, "MarkReachedEventArgs Slider Test Error"); - } - - [Test] - [Category("P1")] - [Description("Update Slide Value in Mark Reached Event Arguments.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Slider.MarkReachedEventArgs.SlideValue A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Xuemei Chen, xnicole.chen@samsung.com")] - public void SlideValue_SET_GET_VALUE() - { - Slider.MarkReachedEventArgs eventArgs = new Slider.MarkReachedEventArgs(); - eventArgs.SlideValue = 2; - Assert.AreEqual(2, eventArgs.SlideValue, "MarkReachedEventArgs Slide Value Test Error"); - } - - } - - - -} - diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSSlider.SlidingFinishedEventArgs.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSSlider.SlidingFinishedEventArgs.cs deleted file mode 100755 index 97ee6fe..0000000 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSSlider.SlidingFinishedEventArgs.cs +++ /dev/null @@ -1,75 +0,0 @@ -using NUnit.Framework; -using NUnit.Framework.TUnit; -using System; -using Tizen.NUI; -using Tizen.NUI.UIComponents; -using System.Threading; -using Tizen.NUI.Test; - -namespace Tizen.NUI.Tests -{ - [TestFixture] - [Description("Tizen.NUI.UIComponents.Slider.SlidingFinishedEventArgs Tests")] - public class SlidingFinishedEventArgsTests - { - private string TAG = "NUI"; - - [SetUp] - public void Init() - { - Tizen.Log.Info(TAG, "Init() is called!"); - App.MainTitleChangeText("SlidingFinishedEventArgsTests"); - App.MainTitleChangeBackgroundColor(null); - } - - [TearDown] - public void Destroy() - { - Tizen.Log.Info(TAG, "Destroy() is called!"); - } - - [Test] - [Category("P1")] - [Description("Test SlidingFinishedEventArgs. Check Slider Finished Event Arguments.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Slider.SlidingFinishedEventArgs.SlidingFinishedEventArgs C")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "CONSTR")] - [Property("AUTHOR", "Xuemei Chen, xnicole.chen@samsung.com")] - public void SlidingFinishedEventArgs_INIT() - { - var eventArgs = new Slider.SlidingFinishedEventArgs(); - Assert.IsInstanceOf(eventArgs, "SlidingFinishedEventArgs construct fail."); - } - - [Test] - [Category("P1")] - [Description("Update Slider Change in Sliding Finished Event Arguments.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Slider.SlidingFinishedEventArgs.Slider A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Xuemei Chen, xnicole.chen@samsung.com")] - public void Slider_SET_GET_VALUE() - { - Slider.SlidingFinishedEventArgs eventArgs = new Slider.SlidingFinishedEventArgs(); - Slider slider = new Slider(); - slider.Name = "test slider"; - eventArgs.Slider = slider; - Assert.AreEqual("test slider", eventArgs.Slider.Name, "SlidingFinishedEventArgs Slider Test Error"); - } - - [Test] - [Category("P1")] - [Description("Update Slider Value Change in Sliding Finished Event Arguments.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Slider.SlidingFinishedEventArgs.SlideValue A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Xuemei Chen, xnicole.chen@samsung.com")] - public void SlideValue_SET_GET_VALUE() - { - Slider.SlidingFinishedEventArgs eventArgs = new Slider.SlidingFinishedEventArgs(); - eventArgs.SlideValue = 100.0f; - Assert.AreEqual(100.0f, eventArgs.SlideValue, "SlidingFinishedEventArgs Slide Value Test Error"); - } - } -} - diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSSlider.ValueChangedEventArgs.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSSlider.ValueChangedEventArgs.cs deleted file mode 100755 index fa7f684..0000000 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSSlider.ValueChangedEventArgs.cs +++ /dev/null @@ -1,74 +0,0 @@ -using NUnit.Framework; -using NUnit.Framework.TUnit; -using System; -using Tizen.NUI; -using Tizen.NUI.UIComponents; -using System.Threading; -using Tizen.NUI.Test; - -namespace Tizen.NUI.Tests -{ - [TestFixture] - [Description("Tizen.NUI.UIComponents.Slider.ValueChangedEventArgs Tests")] - public class ValueChangedEventArgsTests - { - private string TAG = "NUI"; - - [SetUp] - public void Init() - { - Tizen.Log.Info(TAG, "Init() is called!"); - App.MainTitleChangeText("ValueChangedEventArgsTests"); - App.MainTitleChangeBackgroundColor(null); - } - - [TearDown] - public void Destroy() - { - Tizen.Log.Info(TAG, "Destroy() is called!"); - } - - [Test] - [Category("P1")] - [Description("Test ValueChangedEventArgs. Check Slider Value Event Arguments.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Slider.ValueChangedEventArgs.ValueChangedEventArgs C")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "CONSTR")] - [Property("AUTHOR", "Xuemei Chen, xnicole.chen@samsung.com")] - public void ValueChangedEventArgs_INIT() - { - Slider.ValueChangedEventArgs eventArgs = new Slider.ValueChangedEventArgs(); - Assert.IsInstanceOf(eventArgs, "ValueChangeEventsArgs construct fail."); - } - - [Test] - [Category("P1")] - [Description("Update Slider Change in Event Arguments.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Slider.ValueChangedEventArgs.Slider A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Xuemei Chen, xnicole.chen@samsung.com")] - public void Slider_SET_GET_VALUE() - { - Slider.ValueChangedEventArgs eventArgs = new Slider.ValueChangedEventArgs(); - Slider slider = new Slider(); - slider.Name = "test slider"; - eventArgs.Slider = slider; - Assert.AreEqual("test slider", eventArgs.Slider.Name, "ValueChangedEventArgs Slider Test Error"); - } - - [Test] - [Category("P1")] - [Description("Update Slider Value Change in Event Arguments.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Slider.ValueChangedEventArgs.SlideValue A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Xuemei Chen, xnicole.chen@samsung.com")] - public void SlideValue_SET_GET_VALUE() - { - Slider.ValueChangedEventArgs eventArgs = new Slider.ValueChangedEventArgs(); - eventArgs.SlideValue = 100.0f; - Assert.AreEqual(100.0f, eventArgs.SlideValue, "ValueChangedEventArgs Slide Value Test Error"); - } - } -} diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSSlider.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSSlider.cs deleted file mode 100755 index 66b9daa..0000000 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSSlider.cs +++ /dev/null @@ -1,411 +0,0 @@ -using NUnit.Framework; -using NUnit.Framework.TUnit; -using System; -using Tizen.NUI; -using Tizen.NUI.UIComponents; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using Tizen.NUI.Test; - -namespace Tizen.NUI.Tests -{ - [TestFixture] - [Description("Tizen.NUI.UIComponents.Slider Tests")] - public class SliderTests - { - private bool checkValue; - private bool checkFinish; - public bool checkMark; - private string TAG = "TCT"; - private string image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png"; - public SliderTests() - { - checkValue = false; - checkFinish = false; - checkMark = false; - } - - ~SliderTests() - { - } - - [SetUp] - public void Init() - { - Tizen.Log.Info(TAG, "Init() is called!"); - App.MainTitleChangeText("SliderTests"); - App.MainTitleChangeBackgroundColor(null); - } - - [TearDown] - public void Destroy() - { - Tizen.Log.Info(TAG, "Destroy() is called!"); - } - - public bool OnSlidingFinish(object obj, Slider.SlidingFinishedEventArgs args) - { - checkFinish = true; - return true; - } - public bool OnMarkReach(object obj, Slider.MarkReachedEventArgs args) - { - checkMark = true; - return true; - } - public bool OnSliderValueChange(object testObj, Slider.ValueChangedEventArgs args) - { - checkValue = true; - return true; - } - - [Test] - [Category("P1")] - [Description("Test Construct. Check whether Slider construct.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Slider.Slider C")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "CONSTR")] - [Property("AUTHOR", "Xuemei Chen, xnicole.chen@samsung.com")] - public void Slider_INIT() - { - var slider = new Slider(); - Assert.IsInstanceOf(slider, "Costruct Test Fail"); - } - - [Test] - [Category("P1")] - [Description("Test ValueChanged. Check Event Handler of Value Change.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Slider.ValueChanged E")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "EVL")] - [Property("AUTHOR", "Xuemei Chen, xnicole.chen@samsung.com")] - public void ValueChanged_CHECK_EVENT() - { - Slider slider = new Slider(); - checkValue = false; - - EventHandlerWithReturnType changePtr = new EventHandlerWithReturnType(OnSliderValueChange); - slider.ValueChanged += changePtr; - slider.ValueChanged += (obj, e) => - { - return true; - - }; - slider.Value = 3.0f; - - Assert.IsTrue(checkValue, " Value Change add error"); - - checkValue = false; - slider.ValueChanged -= changePtr; - Assert.IsFalse(checkValue, " Value Change remove error"); - } - - [Test] - [Category("P1")] - [Description("Test LowerBound. Check LowerBound Read & Write.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Slider.LowerBound A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Xuemei Chen, xnicole.chen@samsung.com")] - - public void LowerBound_SET_GET_VALUE() - { - Slider slider = new Slider(); - slider.LowerBound = 1.0f; - Assert.AreEqual(1.0f, slider.LowerBound, "Lower Bound Test Fali."); - } - - [Test] - [Category("P1")] - [Description("Test UpperBound. Check UpperBound Read & Write.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Slider.UpperBound A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Xuemei Chen, xnicole.chen@samsung.com")] - - public void UpperBound_SET_GET_VALUE() - { - Slider slider = new Slider(); - slider.UpperBound = 5.0f; - Assert.AreEqual(5.0f, slider.UpperBound, "Upper Bound Test Fail."); - } - - [Test] - [Category("P1")] - [Description("Test Value. Check Value Read & Write.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Slider.Value A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Xuemei Chen, xnicole.chen@samsung.com")] - - public void Value_SET_GET_VALUE() - { - Slider slider = new Slider(); - slider.Value = 5.0f; - Assert.AreEqual(5.0f, slider.Value, "Slider Value Test Fail."); - } - - [Test] - [Category("P1")] - [Description("Test TrackVisual. Check TrackVisual Read & Write.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Slider.TrackVisual A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Xuemei Chen, xnicole.chen@samsung.com")] - public void TrackVisual_SET_GET_VALUE() - { - Slider slider = new Slider(); - PropertyMap map = new PropertyMap(); - map.Add("visualType", new PropertyValue("IMAGE")); - map.Add("size", new PropertyValue(new Vector2(200, 200))); - map.Add("url", new PropertyValue("track2.png")); - slider.TrackVisual = map; - string url = ""; - slider.TrackVisual.Find(2, "url").Get(out url); - Assert.AreEqual("track2.png", url, "track visual test fail."); - } - - - [Test] - [Category("P1")] - [Description("Test HandleVisual. Check HandleVisual Read & Write.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Slider.HandleVisual A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Xuemei Chen, xnicole.chen@samsung.com")] - public void HandleVisual_SET_GET_VALUE() - { - Slider slider = new Slider(); - PropertyMap map = new PropertyMap(); - map.Add("visualType", new PropertyValue("IMAGE")); - map.Add("size", new PropertyValue(new Vector2(200, 200))); - map.Add("url", new PropertyValue("handle2.png")); - slider.HandleVisual = map; - string url = ""; - slider.HandleVisual.Find(2, "url").Get(out url); - Assert.AreEqual("handle2.png", url, "Handle Visual Test Fail."); - } - - [Test] - [Category("P1")] - [Description("Test ProgressVisual. Check ProgressVisual Read & Write.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Slider.ProgressVisual A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Xuemei Chen, xnicole.chen@samsung.com")] - public void ProgressVisual_SET_GET_VALUE() - { - Slider slider = new Slider(); - PropertyMap map = new PropertyMap(); - map.Add("visualType", new PropertyValue("IMAGE")); - map.Add("size", new PropertyValue(new Vector2(200, 200))); - map.Add("url", new PropertyValue("progress2.png")); - slider.ProgressVisual = map; - string url = ""; - slider.ProgressVisual.Find(2, "url").Get(out url); - Assert.AreEqual("progress2.png", url, "Progress Visual Test Fail."); - } - - [Test] - [Category("P1")] - [Description("Test DisabledColor. Check DisabledColor Read & Write.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Slider.DisabledColor A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Xuemei Chen, xnicole.chen@samsung.com")] - - public void DisabledColor_SET_GET_VALUE() - { - Slider slider = new Slider(); - Window.Instance.GetDefaultLayer().Add(slider); - slider.DisabledColor = new Vector4(255, 255, 255, 255); - Assert.AreEqual(255, slider.DisabledColor.R, "Slider Disable Color R Test Fail."); - Assert.AreEqual(255, slider.DisabledColor.G, "Slider Disable Color G Test Fail."); - Assert.AreEqual(255, slider.DisabledColor.B, "Slider Disable Color B Test Fail."); - Assert.AreEqual(255, slider.DisabledColor.A, "Slider Disable Color A Test Fail."); - } - - - [Test] - [Category("P1")] - [Description("Test ValuePrecision. Check ValuePrecision Read & Write.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Slider.ValuePrecision A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Xuemei Chen, xnicole.chen@samsung.com")] - - public void ValuePrecision_SET_GET_VALUE() - { - Slider slider = new Slider(); - slider.ValuePrecision = 4; - Assert.AreEqual(4, slider.ValuePrecision, "Slider ValuePrecision Test Fail."); - } - - - [Test] - [Category("P1")] - [Description("Test ShowPopup. Check ShowPopup Read & Write.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Slider.ShowPopup A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Xuemei Chen, xnicole.chen@samsung.com")] - - public void ShowPopup_SET_GET_VALUE() - { - Slider slider = new Slider(); - slider.ShowPopup = false; - Assert.IsFalse(slider.ShowPopup, "Slider Show Popup Test Fail."); - } - - - [Test] - [Category("P1")] - [Description("Test ShowValue. Check ShowValue Read & Write.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Slider.ShowValue A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Xuemei Chen, xnicole.chen@samsung.com")] - - public void ShowValue_SET_GET_VALUE() - { - Slider slider = new Slider(); - slider.ShowValue = false; - Assert.IsFalse(slider.ShowValue, "Slider Show Value Test Fail."); - } - - [Test] - [Category("P1")] - [Description("Test SnapToMarks. Check SnapToMarks Read & Write.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Slider.SnapToMarks A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Xuemei Chen, xnicole.chen@samsung.com")] - - public void SnapToMarks_SET_GET_VALUE() - { - Slider slider = new Slider(); - slider.SnapToMarks = false; - Assert.IsFalse(slider.SnapToMarks, "Slider SnapToMarks Test Fail."); - } - - - [Test] - [Category("P1")] - [Description("Test MarkTolerance. Check MarkTolerance Read & Write.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Slider.MarkTolerance A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Xuemei Chen, xnicole.chen@samsung.com")] - - public void MarkTolerance_SET_GET_VALUE() - { - Slider slider = new Slider(); - slider.MarkTolerance = 0.2f; - Assert.AreEqual(0.2f, slider.MarkTolerance, "Slider Show Value Test Fail."); - } - - [Test] - [Category("P1")] - [Description("Test Dispose, try to dispose the Slider.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Slider.Dispose M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR MCST")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void Dispose_CHECK_RETURN_TYPE() - { - /* TEST CODE */ - try - { - Slider slider = new Slider(); - slider.Dispose(); - } - catch (Exception e) - { - Tizen.Log.Error(TAG, "Caught Exception" + e.ToString()); - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); - Assert.Fail("Caught Exception" + e.ToString()); - } - } - - [Test] - [Category("P1")] - [Description("Test Marks. Check Marks Read & Write.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Slider.Marks A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Xuemei Chen, xnicole.chen@samsung.com")] - public void Marks_SET_GET_VALUE() - { - Slider slider = new Slider(); - slider.LowerBound = 1.0f; - slider.UpperBound = 5.0f; - - PropertyArray marks = new PropertyArray(); - marks.Add(new PropertyValue(1)); - marks.Add(new PropertyValue(2)); - marks.Add(new PropertyValue(3)); - slider.Marks = marks; - int markValue = 0; - slider.Marks[1].Get(out markValue); - Assert.AreEqual(2, markValue, "Get Marks Error"); - } - - [Test] - [Category("P1")] - [Description("Test PopupVisual. Check PopupVisual Read & Write.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Slider.PopupVisual A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Xuemei Chen, xnicole.chen@samsung.com")] - public void PopupVisual_SET_GET_VALUE() - { - Slider slider = new Slider(); - slider.ShowPopup = true; - PropertyMap map = new PropertyMap(); - map.Add("visualType", new PropertyValue("IMAGE")); - map.Add("size", new PropertyValue(new Vector2(200, 200))); - map.Add("url", new PropertyValue(image_path)); - slider.PopupVisual = map; - string url = ""; - slider.PopupVisual.Find(2, "url").Get(out url); - Assert.AreEqual(image_path, url, "Popup Visual Test Fail."); - } - - - [Test] - [Category("P1")] - [Description("Test PopupArrowVisual. Check ProgressVisual Read & Write.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Slider.PopupArrowVisual A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Xuemei Chen, xnicole.chen@samsung.com")] - public void PopupArrowVisual_SET_GET_VALUE() - { - Slider slider = new Slider(); - slider.ShowPopup = true; - PropertyMap map = new PropertyMap(); - map.Add("visualType", new PropertyValue("IMAGE")); - map.Add("size", new PropertyValue(new Vector2(200, 200))); - map.Add("url", new PropertyValue(image_path)); - slider.PopupArrowVisual = map; - string url = ""; - slider.PopupArrowVisual.Find(2, "url").Get(out url); - Assert.AreEqual(image_path, url, "Popup Arrow Visual Test Fail."); - } - - [Test] - [Category("P1")] - [Description("Test DownCast. Get the Slider instance from handle instance.")] - [Property("SPEC", "Tizen.NUI.UIComponents.Slider.DownCast M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void DownCast_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - BaseHandle handle = new Slider(); - var slider = Slider.DownCast(handle); - Assert.IsInstanceOf(slider); - } - } -} diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSToggleButton.Property.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSToggleButton.Property.cs deleted file mode 100755 index 19d7f51..0000000 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSToggleButton.Property.cs +++ /dev/null @@ -1,85 +0,0 @@ -using NUnit.Framework; -using NUnit.Framework.TUnit; -using System; -using Tizen.NUI; -using Tizen.NUI.BaseComponents; -using Tizen.NUI.Test; - -namespace Tizen.NUI.Tests -{ - [TestFixture] - [Description("Tizen.NUI.ToggleButton.Property Tests")] - public class ToggleButtonPropertyTests - { - private string TAG = "NUI"; - private static int PROPERTY_START_INDEX = 10000000 + 1000 + 1 + 1000 + 1; - - [SetUp] - public void Init() - { - Tizen.Log.Info(TAG, "Init() is called!"); - App.MainTitleChangeText("ToggleButtonPropertyTests"); - App.MainTitleChangeBackgroundColor(null); - } - - [TearDown] - public void Destroy() - { - Tizen.Log.Info(TAG, "Destroy() is called!"); - } - - [Test] - [Category("P1")] - [Description("Create a Property object. Check whether Property is successfully created or not.")] - [Property("SPEC", "Tizen.NUI.ToggleButton.Property.Property C")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "CONSTR")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void Property_INIT() - { - /* TEST CODE */ - var property = new ToggleButton.Property(); - Assert.IsNotNull(property, "Can't create success object Property"); - Assert.IsInstanceOf(property, "Should be an instance of Property type."); - } - - [Test] - [Category("P1")] - [Description("Test STATE_VISUALS. Check whether STATE_VISUALS returns expected value or not.")] - [Property("SPEC", "Tizen.NUI.ToggleButton.Property.STATE_VISUALS A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRO")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void STATE_VISUALS_GET_VALUE() - { - /* TEST CODE */ - Assert.AreEqual(PROPERTY_START_INDEX, ToggleButton.Property.STATE_VISUALS, "STATE_VISUALS shold be equals to the set value"); - } - - [Test] - [Category("P1")] - [Description("Test TOOLTIPS. Check whether TOOLTIPS returns expected value or not.")] - [Property("SPEC", "Tizen.NUI.ToggleButton.Property.TOOLTIPS A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRO")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void TOOLTIPS_GET_VALUE() - { - /* TEST CODE */ - Assert.AreEqual(PROPERTY_START_INDEX + 1, ToggleButton.Property.TOOLTIPS, "TOOLTIPS shold be equals to the set value"); - } - - [Test] - [Category("P1")] - [Description("Test CURRENT_STATE_INDEX. Check whether CURRENT_STATE_INDEX returns expected value or not.")] - [Property("SPEC", "Tizen.NUI.ToggleButton.Property.CURRENT_STATE_INDEX A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRO")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void CURRENT_STATE_INDEX_GET_VALUE() - { - /* TEST CODE */ - Assert.AreEqual(PROPERTY_START_INDEX + 2, ToggleButton.Property.CURRENT_STATE_INDEX, "CURRENT_STATE_INDEX shold be equals to the set value"); - } - } -} diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSToggleButton.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSToggleButton.cs deleted file mode 100755 index 576944f..0000000 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSToggleButton.cs +++ /dev/null @@ -1,146 +0,0 @@ -using NUnit.Framework; -using NUnit.Framework.TUnit; -using System; -using Tizen.NUI; -using Tizen.NUI.Test; - -namespace Tizen.NUI.Tests -{ - [TestFixture] - [Description("Tizen.NUI.ToggleButton Tests")] - public class ToggleButtonTests - { - private string TAG = "NUI"; - private string image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "Tizen.NUI.Tests.png"; - private string image_path1 = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png"; - - [SetUp] - public void Init() - { - Tizen.Log.Info(TAG, "Init() is called!"); - App.MainTitleChangeText("ToggleButtonTests"); - App.MainTitleChangeBackgroundColor(null); - } - - [TearDown] - public void Destroy() - { - Tizen.Log.Info(TAG, "Destroy() is called!"); - } - - [Test] - [Category("P1")] - [Description("Create a toggleButtonButton object.Check whether object is successfully created or not.")] - [Property("SPEC", "Tizen.NUI.ToggleButton.ToggleButton C")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "CONSTR")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void ToggleButton_INIT() - { - /* TEST CODE */ - var toggleButton = new ToggleButton(); - - Assert.IsNotNull(toggleButton, "Can't create success object ToggleButton"); - Assert.IsInstanceOf(toggleButton, "Should be an instance of ToggleButton type."); - } - - [Test] - [Category("P1")] - [Description("Test StateVisuals.Check whether StateVisuals works or not.")] - [Property("SPEC", "Tizen.NUI.ToggleButton.StateVisuals A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void StateVisuals_SET_GET_VALUE() - { - /* TEST CODE */ - var toggleButton = new ToggleButton(); - PropertyArray array = new PropertyArray(); - array.Add(new PropertyValue(image_path)); - array.Add(new PropertyValue(image_path1)); - toggleButton.StateVisuals = array; - - Window.Instance.GetDefaultLayer().Add(toggleButton); - - PropertyArray array1 = toggleButton.StateVisuals; - PropertyValue value = array1[0]; - string imagePath; - value.Get(out imagePath); - Assert.AreEqual(image_path, imagePath, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("Test CurrentStateIndex.Check whether CurrentStateIndex works or not.")] - [Property("SPEC", "Tizen.NUI.ToggleButton.CurrentStateIndex A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void CurrentStateIndex_SET_GET_VALUE() - { - /* TEST CODE */ - var toggleButton = new ToggleButton(); - PropertyArray array = new PropertyArray(); - array.Add(new PropertyValue(image_path)); - array.Add(new PropertyValue(image_path1)); - toggleButton.CurrentStateIndex = 0; - - Window.Instance.GetDefaultLayer().Add(toggleButton); - Assert.AreEqual(0, toggleButton.CurrentStateIndex, "Should be equal!"); - } - - - [Test] - [Category("P1")] - [Description("Test Tooltips.Check whether Tooltips works or not.")] - [Property("SPEC", "Tizen.NUI.ToggleButton.Tooltips A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void Tooltips_SET_GET_VALUE() - { - /* TEST CODE */ - var toggleButton = new ToggleButton(); - PropertyArray imageArray = new PropertyArray(); - imageArray.Add(new PropertyValue(image_path)); - imageArray.Add(new PropertyValue(image_path1)); - toggleButton.StateVisuals = imageArray; - - PropertyArray tipArray = new PropertyArray(); - tipArray.Add(new PropertyValue("ON")); - tipArray.Add(new PropertyValue("OFF")); - toggleButton.Tooltips = tipArray; - - Window.Instance.GetDefaultLayer().Add(toggleButton); - - PropertyArray array1 = toggleButton.Tooltips; - PropertyValue value = array1[0]; - string tip; - value.Get(out tip); - Assert.AreEqual("ON", tip, "Should be equal!"); - } - - [Test] - [Category("P1")] - [Description("Test Dispose, try to dispose the ToggleButton.")] - [Property("SPEC", "Tizen.NUI.ToggleButton.Dispose M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR MCST")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void Dispose_CHECK_RETURN_VALUE() - { - /* TEST CODE */ - try - { - ToggleButton ToggleButton = new ToggleButton(); - ToggleButton.Dispose(); - } - catch (Exception e) - { - Tizen.Log.Error(TAG, "Caught Exception" + e.ToString()); - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); - Assert.Fail("Caught Exception" + e.ToString()); - } - } - } -}