From 2a2971cac0a39e7748dc2c1aaeb58410664673fe Mon Sep 17 00:00:00 2001 From: "xb.teng" Date: Wed, 30 Jan 2019 20:41:48 +0800 Subject: [PATCH] [NUI][Non-ACR][Update TCTs for Tizen.NUI] Change-Id: Id858d346e8798d4fc83c601f4484c914c03fdda0 --- .../Tizen.NUI.Tests/testcase/TSAnimation.cs | 14 +++ .../Tizen.NUI.Tests/testcase/TSBaseHandle.cs | 49 ++++++++ tct-suite-vs/Tizen.NUI.Tests/testcase/TSGesture.cs | 132 +++++++++++++++++++++ .../Tizen.NUI.Tests/testcase/TSNUIEventType.cs | 106 +++++++++++++++++ .../Tizen.NUI.Tests/testcase/TSPaddingType.cs | 35 ++++++ .../Tizen.NUI.Tests/testcase/TSPosition.cs | 16 +++ .../Tizen.NUI.Tests/testcase/TSPosition2D.cs | 16 +++ .../Tizen.NUI.Tests/testcase/TSRectangle.cs | 37 ++++++ .../Tizen.NUI.Tests/testcase/TSRelativeVector2.cs | 16 +++ .../Tizen.NUI.Tests/testcase/TSRelativeVector3.cs | 16 +++ .../Tizen.NUI.Tests/testcase/TSRelativeVector4.cs | 16 +++ tct-suite-vs/Tizen.NUI.Tests/testcase/TSSize.cs | 16 +++ tct-suite-vs/Tizen.NUI.Tests/testcase/TSSize2D.cs | 16 +++ .../Tizen.NUI.Tests/testcase/TSTextEditor.cs | 42 +++++++ tct-suite-vs/Tizen.NUI.Tests/testcase/TSTexture.cs | 58 +++++++++ tct-suite-vs/Tizen.NUI.Tests/testcase/TSVector2.cs | 16 +++ tct-suite-vs/Tizen.NUI.Tests/testcase/TSVector3.cs | 16 +++ tct-suite-vs/Tizen.NUI.Tests/testcase/TSVector4.cs | 16 +++ tct-suite-vs/Tizen.NUI.Tests/testcase/TSView.cs | 12 +- .../Tizen.NUI.Tests/testcase/TSVisualView.cs | 126 ++++++++++++++++++++ .../testcase/TSWebView.WebViewEventArgs.cs | 77 ++++++++++++ 21 files changed, 842 insertions(+), 6 deletions(-) create mode 100755 tct-suite-vs/Tizen.NUI.Tests/testcase/TSGesture.cs create mode 100755 tct-suite-vs/Tizen.NUI.Tests/testcase/TSNUIEventType.cs create mode 100755 tct-suite-vs/Tizen.NUI.Tests/testcase/TSWebView.WebViewEventArgs.cs diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSAnimation.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSAnimation.cs index 6eeb76d..37b5e9d 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSAnimation.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSAnimation.cs @@ -892,7 +892,21 @@ namespace Tizen.NUI.Tests animation.Play(); await Task.Delay(2000); Assert.IsTrue(flag, "The ProgressReached Event is incorrect!"); + } + [Test] + [Category("P1")] + [Description("Test DownCast. Get the Animation instance from a handle instance")] + [Property("SPEC", "Tizen.NUI.Animation.DownCast M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] + public void DownCast_CHECK_RETURN_TYPE() + { + /* TEST CODE */ + BaseHandle handle = new Animation(); + Animation animation = Animation.DownCast(handle); + Assert.IsInstanceOf(animation, "Should return a instance of Animation"); } } } diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSBaseHandle.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSBaseHandle.cs index 08185d9..2e01612 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSBaseHandle.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSBaseHandle.cs @@ -425,5 +425,54 @@ namespace Tizen.NUI.Tests Assert.Fail("Caught Exception" + e.ToString()); } } + + [Test] + [Category("P1")] + [Description("Test Equals. Check whether Equals returns expected value or not.")] + [Property("SPEC", "Tizen.NUI.BaseHandle.Equals M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")] + public void Equals_CHECK_RETURN_VALUE() + { + /* TEST CODE */ + try + { + BaseHandle baseHandle = new View(); + View view = baseHandle as View; + View view2 = new View(); + Assert.True(baseHandle.Equals(view), "Should be true"); + Assert.False(baseHandle.Equals(view2), "Should be false"); + } + 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 GetHashCode. Check whether GetHashCode returns expected value or not.")] + [Property("SPEC", "Tizen.NUI.BaseHandle.GetHashCode M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")] + public void GetHashCode_CHECK_RETURN_VALUE() + { + /* TEST CODE */ + try + { + BaseHandle baseHandle = new View(); + Assert.GreaterOrEqual(baseHandle.GetHashCode(), 0, "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()); + } + } } } diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSGesture.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSGesture.cs new file mode 100755 index 0000000..a6e9bf8 --- /dev/null +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSGesture.cs @@ -0,0 +1,132 @@ +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.Gesture Tests")] + public class GestureTests + { + private string TAG = "NUI"; + + [SetUp] + public void Init() + { + Tizen.Log.Info(TAG, "Init() is called!"); + App.MainTitleChangeText("GestureTests"); + App.MainTitleChangeBackgroundColor(null); + } + + [TearDown] + public void Destroy() + { + Tizen.Log.Info(TAG, "Destroy() is called!"); + } + + [Test] + [Category("P1")] + [Description("Create a Gesture object. Check whether Gesture is successfully created or not.")] + [Property("SPEC", "Tizen.NUI.Gesture.Gesture C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("COVPARAM", "Gesture")] + [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")] + public void Gesture_INIT() + { + /* TEST CODE */ + var longPressGesture = new LongPressGesture(Gesture.StateType.Cancelled); + Assert.IsNotNull(longPressGesture, "Can't create success object LongPressGesture"); + var gesture = new Gesture(longPressGesture); + Assert.IsNotNull(gesture, "Can't create success object Gesture"); + Assert.IsInstanceOf(gesture, "Should be an instance of Gesture type."); + } + + [Test] + [Category("P1")] + [Description("Test Type. Check whether Type is readable.")] + [Property("SPEC", "Tizen.NUI.Gesture.Type A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRO")] + [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")] + public void Type_GET_VALUE() + { + /* TEST CODE */ + try + { + var longPressGesture = new LongPressGesture(Gesture.StateType.Cancelled); + Assert.IsNotNull(longPressGesture, "Can't create success object LongPressGesture"); + var gesture = new Gesture(longPressGesture); + Assert.IsNotNull(gesture, "Can't create success object Gesture"); + Assert.IsInstanceOf(gesture, "Should be an instance of Gesture type."); + Gesture.GestureType type = gesture.Type; + Assert.AreEqual(Gesture.GestureType.LongPress, type, "Should be same value"); + } + 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 State. Check whether State is readable.")] + [Property("SPEC", "Tizen.NUI.Gesture.State A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRO")] + [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")] + public void State_GET_VALUE() + { + /* TEST CODE */ + try + { + var longPressGesture = new LongPressGesture(Gesture.StateType.Cancelled); + Assert.IsNotNull(longPressGesture, "Can't create success object LongPressGesture"); + var gesture = new Gesture(longPressGesture); + Assert.IsNotNull(gesture, "Can't create success object Gesture"); + Assert.IsInstanceOf(gesture, "Should be an instance of Gesture type."); + Gesture.StateType state = gesture.State; + Assert.AreEqual(Gesture.StateType.Cancelled, state, "Should be same value"); + } + 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 Time. Check whether Time is readable.")] + [Property("SPEC", "Tizen.NUI.Gesture.Time A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRO")] + [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")] + public void Time_GET_VALUE() + { + /* TEST CODE */ + try + { + var longPressGesture = new LongPressGesture(Gesture.StateType.Cancelled); + Assert.IsNotNull(longPressGesture, "Can't create success object LongPressGesture"); + var gesture = new Gesture(longPressGesture); + Assert.IsNotNull(gesture, "Can't create success object Gesture"); + Assert.IsInstanceOf(gesture, "Should be an instance of Gesture type."); + uint time = gesture.Time; + Assert.GreaterOrEqual(time, 0, "Should be greater or equal 0"); + } + 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/TSNUIEventType.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSNUIEventType.cs new file mode 100755 index 0000000..f12874b --- /dev/null +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSNUIEventType.cs @@ -0,0 +1,106 @@ +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.NUIEventType Tests")] + public class NUIEventTypeTests + { + private string TAG = "NUI"; + + [SetUp] + public void Init() + { + Tizen.Log.Info(TAG, "Init() is called!"); + App.MainTitleChangeText("NUIEventTypeTests"); + App.MainTitleChangeBackgroundColor(null); + } + + [TearDown] + public void Destroy() + { + Tizen.Log.Info(TAG, "Destroy() is called!"); + } + + [Test] + [Category("P1")] + [Description("Create a NUIEventType object. Check whether object is successfully created or not.")] + [Property("SPEC", "Tizen.NUI.NUIEventType.NUIEventType C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] + public void NUIEventType_INIT() + { + /* TEST CODE */ + var nuiEventType = new NUIEventType("TimeTick"); + + Assert.IsNotNull(nuiEventType, "Can't create success object NUIEventType"); + Assert.IsInstanceOf(nuiEventType, "Should be an instance of NUIEventType type."); + } + + [Test] + [Category("P1")] + [Description("Test TimeTick, Check whether TimeTick property is readable.")] + [Property("SPEC", "Tizen.NUI.NUIEventType.TimeTick A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRO")] + [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] + public void TimeTick_GET_VALUE() + { + /* TEST CODE */ + var nuiEventType = NUIEventType.TimeTick; + Assert.IsInstanceOf(nuiEventType, "Should be an instance of NUIEventType type."); + Assert.AreEqual(NUIEventType.TimeTick, nuiEventType, "Should be equal!"); + } + + [Test] + [Category("P1")] + [Description("Test AmbientTick, Check whether AmbientTick property is readable.")] + [Property("SPEC", "Tizen.NUI.NUIEventType.AmbientTick A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRO")] + [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] + public void AmbientTick_GET_VALUE() + { + /* TEST CODE */ + var nuiEventType = NUIEventType.AmbientTick; + Assert.IsInstanceOf(nuiEventType, "Should be an instance of NUIEventType type."); + Assert.AreEqual(NUIEventType.AmbientTick, nuiEventType, "Should be equal!"); + } + + [Test] + [Category("P1")] + [Description("Test AmbientChanged, Check whether AmbientChanged property is readable.")] + [Property("SPEC", "Tizen.NUI.NUIEventType.AmbientChanged A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRO")] + [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] + public void AmbientChanged_GET_VALUE() + { + /* TEST CODE */ + var nuiEventType = NUIEventType.AmbientChanged; + Assert.IsInstanceOf(nuiEventType, "Should be an instance of NUIEventType type."); + Assert.AreEqual(NUIEventType.AmbientChanged, nuiEventType, "Should be equal!"); + } + + [Test] + [Category("P1")] + [Description("Test implicit string. Try to convert a string to a NUIEventType instance.")] + [Property("SPEC", "Tizen.NUI.NUIEventType.implicit M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("COVPARAM", "string")] + [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] + public void implicit_STRING_RETURN_VALUE() + { + /* TEST CODE */ + NUIEventType nuiEventType = "TimeTick"; + Assert.IsInstanceOf(nuiEventType, "Should be an instance of NUIEventType type."); + } + } +} diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPaddingType.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPaddingType.cs index fd36e78..46e3e1f 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPaddingType.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPaddingType.cs @@ -205,5 +205,40 @@ namespace Tizen.NUI.Tests Assert.Fail("Caught Exception" + e.ToString()); } } + + [Test] + [Category("P1")] + [Description("Test Equals. Check whether Equals returns expected value or not.")] + [Property("SPEC", "Tizen.NUI.PaddingType.Equals M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")] + public void Equals_CHECK_RETURN_VALUE() + { + /* TEST CODE */ + var paddingType1 = new PaddingType(0.0f, 0.0f, 20.0f, 30.0f); + var paddingType2 = new PaddingType(0.0f, 0.0f, 20.0f, 30.0f); + var paddingType3 = new PaddingType(10.0f, 0.0f, 20.0f, 30.0f); + bool flagTrue = paddingType1.Equals(paddingType2); + bool flagFalse = paddingType1.Equals(paddingType3); + Assert.IsTrue(flagTrue, "Should be true!"); + Assert.IsFalse(flagFalse, "Should be false!"); + } + + [Test] + [Category("P1")] + [Description("Test GetHashCode. Check whether GetHashCode returns expected value or not.")] + [Property("SPEC", "Tizen.NUI.PaddingType.GetHashCode M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")] + public void GetHashCode_CHECK_RETURN_VALUE() + { + /* TEST CODE */ + var paddingType = new PaddingType(); + Assert.IsNotNull(paddingType, "Can't create success object PaddingType"); + Assert.IsInstanceOf(paddingType, "Should be an instance of PaddingType type."); + Assert.GreaterOrEqual(paddingType.GetHashCode(), 0, "Should be true"); + } } } diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPosition.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPosition.cs index 1b96491..67a4db4 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPosition.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPosition.cs @@ -793,5 +793,21 @@ namespace Tizen.NUI.Tests Assert.AreEqual(position.Y, vector.Y, "The value of Y is not correct."); Assert.AreEqual(position.Z, vector.Z, "The value of Z is not correct."); } + + [Test] + [Category("P1")] + [Description("Test GetHashCode. Check whether GetHashCode returns expected value or not.")] + [Property("SPEC", "Tizen.NUI.Position.GetHashCode M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")] + public void GetHashCode_CHECK_RETURN_VALUE() + { + /* TEST CODE */ + var position = new Position(10.0f, 20.0f, 30.0f); + Assert.IsNotNull(position, "Can't create success object Position"); + Assert.IsInstanceOf(position, "Should be an instance of Position type."); + Assert.GreaterOrEqual(position.GetHashCode(), 0, "Should be true"); + } } } diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPosition2D.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPosition2D.cs index 5c3d585..c68b47c 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPosition2D.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPosition2D.cs @@ -380,5 +380,21 @@ namespace Tizen.NUI.Tests Assert.Fail("Caught Exception" + e.ToString()); } } + + [Test] + [Category("P1")] + [Description("Test GetHashCode. Check whether GetHashCode returns expected value or not.")] + [Property("SPEC", "Tizen.NUI.Position2D.GetHashCode M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")] + public void GetHashCode_CHECK_RETURN_VALUE() + { + /* TEST CODE */ + var position = new Position2D(10, 20); + Assert.IsNotNull(position, "Can't create success object Position2D"); + Assert.IsInstanceOf(position, "Should be an instance of Position2D type."); + Assert.GreaterOrEqual(position.GetHashCode(), 0, "Should be true"); + } } } diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSRectangle.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSRectangle.cs index 1cef911..ec950f6 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSRectangle.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSRectangle.cs @@ -327,5 +327,42 @@ namespace Tizen.NUI.Tests Assert.IsTrue(rectangle1.Contains(rectangle10), "rectangle1 does not Contains rectangle10."); Assert.IsTrue(rectangle1.Contains(rectangle11), "rectangle1 does not Contains rectangle11."); } + + [Test] + [Category("P1")] + [Description("Test Equals. Check whether Equals returns expected value or not.")] + [Property("SPEC", "Tizen.NUI.Rectangle.Equals M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")] + public void Equals_CHECK_RETURN_VALUE() + { + /* TEST CODE */ + /* TEST CODE */ + Rectangle rectangle1 = new Rectangle(5, 6, 100, 200); + Rectangle rectangle2 = new Rectangle(5, 6, 100, 200); + Rectangle rectangle3 = new Rectangle(50, 60, 100, 200); + + bool flagTrue = rectangle1.Equals(rectangle2); + bool flagFalse = rectangle1.Equals(rectangle3); + Assert.IsTrue(flagTrue, "Should be true!"); + Assert.IsFalse(flagFalse, "Should be false!"); + } + + [Test] + [Category("P1")] + [Description("Test GetHashCode. Check whether GetHashCode returns expected value or not.")] + [Property("SPEC", "Tizen.NUI.Rectangle.GetHashCode M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")] + public void GetHashCode_CHECK_RETURN_VALUE() + { + /* TEST CODE */ + var rectangle = new Rectangle(5, 6, 100, 200); + Assert.IsNotNull(rectangle, "Can't create success object Rectangle"); + Assert.IsInstanceOf(rectangle, "Should be an instance of Rectangle type."); + Assert.GreaterOrEqual(rectangle.GetHashCode(), 0, "Should be true"); + } } } \ No newline at end of file diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSRelativeVector2.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSRelativeVector2.cs index 38134a3..ad389e7 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSRelativeVector2.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSRelativeVector2.cs @@ -342,5 +342,21 @@ namespace Tizen.NUI.Tests Assert.Fail("Caught Exception" + e.ToString()); } } + + [Test] + [Category("P1")] + [Description("Test GetHashCode. Check whether GetHashCode returns expected value or not.")] + [Property("SPEC", "Tizen.NUI.RelativeVector2.GetHashCode M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")] + public void GetHashCode_CHECK_RETURN_VALUE() + { + /* TEST CODE */ + var vector1 = new RelativeVector2(1.0f, 0.0f); + Assert.IsNotNull(vector1, "Can't create success object RelativeVector2"); + Assert.IsInstanceOf(vector1, "Should be an instance of RelativeVector2 type."); + Assert.GreaterOrEqual(vector1.GetHashCode(), 0, "Should be true"); + } } } diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSRelativeVector3.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSRelativeVector3.cs index 511ff44..0751785 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSRelativeVector3.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSRelativeVector3.cs @@ -372,5 +372,21 @@ namespace Tizen.NUI.Tests Assert.Fail("Caught Exception" + e.ToString()); } } + + [Test] + [Category("P1")] + [Description("Test GetHashCode. Check whether GetHashCode returns expected value or not.")] + [Property("SPEC", "Tizen.NUI.RelativeVector3.GetHashCode M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")] + public void GetHashCode_CHECK_RETURN_VALUE() + { + /* TEST CODE */ + var vector1 = new RelativeVector3(0.5f, 0.6f, 0.7f); + Assert.IsNotNull(vector1, "Can't create success object RelativeVector3"); + Assert.IsInstanceOf(vector1, "Should be an instance of RelativeVector3 type."); + Assert.GreaterOrEqual(vector1.GetHashCode(), 0, "Should be true"); + } } } diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSRelativeVector4.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSRelativeVector4.cs index 7ea82cb..2c334fd 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSRelativeVector4.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSRelativeVector4.cs @@ -405,5 +405,21 @@ namespace Tizen.NUI.Tests Assert.Fail("Caught Exception" + e.ToString()); } } + + [Test] + [Category("P1")] + [Description("Test GetHashCode. Check whether GetHashCode returns expected value or not.")] + [Property("SPEC", "Tizen.NUI.RelativeVector4.GetHashCode M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")] + public void GetHashCode_CHECK_RETURN_VALUE() + { + /* TEST CODE */ + var vector1 = new RelativeVector4(10.0f, 20.0f, 30.0f, 40.0f); + Assert.IsNotNull(vector1, "Can't create success object RelativeVector4"); + Assert.IsInstanceOf(vector1, "Should be an instance of RelativeVector4 type."); + Assert.GreaterOrEqual(vector1.GetHashCode(), 0, "Should be true"); + } } } diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSSize.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSSize.cs index 9300614..99ffff8 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSSize.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSSize.cs @@ -392,6 +392,22 @@ namespace Tizen.NUI.Tests Assert.Fail("Caught Exception" + e.ToString()); } } + + [Test] + [Category("P1")] + [Description("Test GetHashCode. Check whether GetHashCode returns expected value or not.")] + [Property("SPEC", "Tizen.NUI.Size.GetHashCode M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")] + public void GetHashCode_CHECK_RETURN_VALUE() + { + /* TEST CODE */ + var size = new Size(10.0f, 20.0f, 30.0f); + Assert.IsNotNull(size, "Can't create success object Size"); + Assert.IsInstanceOf(size, "Should be an instance of Size type."); + Assert.GreaterOrEqual(size.GetHashCode(), 0, "Should be true"); + } } } diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSSize2D.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSSize2D.cs index 45f5bc7..a5034c7 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSSize2D.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSSize2D.cs @@ -329,5 +329,21 @@ namespace Tizen.NUI.Tests Assert.Fail("Caught Exception" + e.ToString()); } } + + [Test] + [Category("P1")] + [Description("Test GetHashCode. Check whether GetHashCode returns expected value or not.")] + [Property("SPEC", "Tizen.NUI.Size2D.GetHashCode M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")] + public void GetHashCode_CHECK_RETURN_VALUE() + { + /* TEST CODE */ + var size = new Size2D(10, 20); + Assert.IsNotNull(size, "Can't create success object Size2D"); + Assert.IsInstanceOf(size, "Should be an instance of Size2D type."); + Assert.GreaterOrEqual(size.GetHashCode(), 0, "Should be true"); + } } } \ No newline at end of file diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs index ba5812e..358b47e 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs @@ -13,6 +13,7 @@ namespace Tizen.NUI.Tests public class TextEditorTests { private string TAG = "NUI"; + private bool _flagScrollStateChanged = false; private string image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "Tizen.NUI.Tests.png"; [SetUp] @@ -29,6 +30,11 @@ namespace Tizen.NUI.Tests Tizen.Log.Info(TAG, "Destroy() is called!"); } + private void OnScrollStateChanged(object sender, EventArgs e) + { + _flagScrollStateChanged = true; + } + [Test] [Category("P1")] [Description("Create a TextEditor object. Check whether object is successfully created or not.")] @@ -1096,5 +1102,41 @@ namespace Tizen.NUI.Tests Assert.Fail("Caught Exception" + e.ToString()); } } + + [Test] + [Category("P1")] + [Description("Test ScrollStateChanged.Check whether ScrollStateChanged defined in the spec is callable.")] + [Property("SPEC", "Tizen.NUI.BaseComponents.TextEditor.ScrollStateChanged E")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "EVL")] + [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] + public async Task ScrollStateChanged_CHECK_EVENT() + { + var textEditor = new TextEditor() + { + Size2D = new Size2D(100, 60), + Text = "Hello Hello World World", + Focusable = true, + }; + Window.Instance.Add(textEditor); + try + { + textEditor.ScrollStateChanged += OnScrollStateChanged; + FocusManager.Instance.SetCurrentFocusView(textEditor); + await Task.Delay(500); + Assert.IsTrue(_flagScrollStateChanged, "ScrollStateChanged is not be called"); + } + 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 + { + textEditor.ScrollStateChanged -= OnScrollStateChanged; + Window.Instance.Remove(textEditor); + } + } } } diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTexture.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTexture.cs index 4dbf607..5303b6f 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTexture.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTexture.cs @@ -92,5 +92,63 @@ namespace Tizen.NUI.Tests Assert.Fail("Caught Exception" + e.ToString()); } } + + [Test] + [Category("P1")] + [Description("Test Upload. Check whether GenerateMipmaps function works or not.")] + [Property("SPEC", "Tizen.NUI.Texture.Upload M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MCST")] + [Property("COVPARAM", "PixelData")] + [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")] + public void Upload_PixelData_CHECK_RETURN_VALUE() + { + /* TEST CODE */ + try + { + uint width = 64; + uint height = 64; + Texture texture = new Texture(TextureType.TEXTURE_2D, PixelFormat.RGBA8888, width, height); + uint bufferSize = width * height * 4; + byte[] buffer = new byte[bufferSize]; + PixelData pixelData = new PixelData(buffer, bufferSize, width, height, PixelFormat.RGBA8888, PixelData.ReleaseFunction.Free); + texture.Upload(pixelData); + } + 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 Upload. Check whether GenerateMipmaps function works or not.")] + [Property("SPEC", "Tizen.NUI.Texture.Upload M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MCST")] + [Property("COVPARAM", "PixelData, uint, uint, uint, uint, uint, uint")] + [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")] + public void Upload_Multi_CHECK_RETURN_VALUE() + { + /* TEST CODE */ + try + { + uint width = 64; + uint height = 64; + Texture texture = new Texture(TextureType.TEXTURE_2D, PixelFormat.RGBA8888, width, height); + uint bufferSize = width * height * 2; + byte[] buffer = new byte[bufferSize]; + PixelData pixelData = new PixelData(buffer, bufferSize, width, height, PixelFormat.RGBA8888, PixelData.ReleaseFunction.Free); + texture.Upload(pixelData, 0u, 0u, width / 2, height / 2, width / 2, height / 2); + } + 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()); + } + } } } \ No newline at end of file diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSVector2.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSVector2.cs index 3543fe2..52a8755 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSVector2.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSVector2.cs @@ -512,5 +512,21 @@ namespace Tizen.NUI.Tests Assert.Fail("Caught Exception" + e.ToString()); } } + + [Test] + [Category("P1")] + [Description("Test GetHashCode. Check whether GetHashCode returns expected value or not.")] + [Property("SPEC", "Tizen.NUI.Vector2.GetHashCode M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")] + public void GetHashCode_CHECK_RETURN_VALUE() + { + /* TEST CODE */ + var vector = new Vector2(10.0f, 20.0f); + Assert.IsNotNull(vector, "Can't create success object Vector2"); + Assert.IsInstanceOf(vector, "Should be an instance of Vector2 type."); + Assert.GreaterOrEqual(vector.GetHashCode(), 0, "Should be true"); + } } } diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSVector3.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSVector3.cs index f7fe265..c6fc67c 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSVector3.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSVector3.cs @@ -653,5 +653,21 @@ namespace Tizen.NUI.Tests Assert.Fail("Caught Exception" + e.ToString()); } } + + [Test] + [Category("P1")] + [Description("Test GetHashCode. Check whether GetHashCode returns expected value or not.")] + [Property("SPEC", "Tizen.NUI.Vector3.GetHashCode M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")] + public void GetHashCode_CHECK_RETURN_VALUE() + { + /* TEST CODE */ + var vector = new Vector3(10.0f, 20.0f, 30.0f); + Assert.IsNotNull(vector, "Can't create success object Vector3"); + Assert.IsInstanceOf(vector, "Should be an instance of Vector3 type."); + Assert.GreaterOrEqual(vector.GetHashCode(), 0, "Should be true"); + } } } diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSVector4.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSVector4.cs index 98d9cfe..a3ffebf 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSVector4.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSVector4.cs @@ -640,5 +640,21 @@ namespace Tizen.NUI.Tests Assert.Fail("Caught Exception" + e.ToString()); } } + + [Test] + [Category("P1")] + [Description("Test GetHashCode. Check whether GetHashCode returns expected value or not.")] + [Property("SPEC", "Tizen.NUI.Vector4.GetHashCode M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")] + public void GetHashCode_CHECK_RETURN_VALUE() + { + /* TEST CODE */ + var vector = new Vector4(10.0f, 20.0f, 30.0f, 40.0f); + Assert.IsNotNull(vector, "Can't create success object Vector4"); + Assert.IsInstanceOf(vector, "Should be an instance of Vector4 type."); + Assert.GreaterOrEqual(vector.GetHashCode(), 0, "Should be true"); + } } } diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSView.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSView.cs index 347ceac..94ba9ca 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSView.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSView.cs @@ -2292,12 +2292,12 @@ namespace Tizen.NUI.Tests parentActor.Add(actor); await Task.Delay(200); - Assert.Greater(parentActor.WorldPosition.X, 0, "ParentActor's WorldPosition.X is incorrect"); - Assert.Greater(parentActor.WorldPosition.Y, 0, "ParentActor's WorldPosition.Y is incorrect"); - Assert.Greater(parentActor.WorldPosition.Z, 0, "ParentActor's WorldPosition.Z is incorrect"); - Assert.Greater(actor.WorldPosition.X, 0, "ChildActor's WorldPosition.X is incorrect"); - Assert.Greater(actor.WorldPosition.Y, 0, "ChildActor's WorldPosition.Y is incorrect"); - Assert.Greater(actor.WorldPosition.Z, 0, "ChildActor's WorldPosition.Z is incorrect"); + Assert.GreaterOrEqual(parentActor.WorldPosition.X, 0, "ParentActor's WorldPosition.X is incorrect"); + Assert.GreaterOrEqual(parentActor.WorldPosition.Y, 0, "ParentActor's WorldPosition.Y is incorrect"); + Assert.GreaterOrEqual(parentActor.WorldPosition.Z, 0, "ParentActor's WorldPosition.Z is incorrect"); + Assert.GreaterOrEqual(actor.WorldPosition.X, 0, "ChildActor's WorldPosition.X is incorrect"); + Assert.GreaterOrEqual(actor.WorldPosition.Y, 0, "ChildActor's WorldPosition.Y is incorrect"); + Assert.GreaterOrEqual(actor.WorldPosition.Z, 0, "ChildActor's WorldPosition.Z is incorrect"); Window.Instance.GetDefaultLayer().Remove(parentActor); } diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSVisualView.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSVisualView.cs index c92cc31..a64ba93 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSVisualView.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSVisualView.cs @@ -1,6 +1,7 @@ using NUnit.Framework; using NUnit.Framework.TUnit; using System; +using System.Threading.Tasks; using Tizen.NUI; using Tizen.NUI.BaseComponents; using System.Runtime.InteropServices; @@ -14,6 +15,7 @@ namespace Tizen.NUI.Tests { private string image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png"; private string TAG = "NUI"; + internal static bool _flagOnRelayout = false; [SetUp] public void Init() @@ -262,5 +264,129 @@ namespace Tizen.NUI.Tests Assert.Fail("Caught Exception" + e.ToString()); } } + + [Test] + [Category("P1")] + [Description("Test OnRelayout. Check visual count after remove all.")] + [Property("SPEC", "Tizen.NUI.BaseComponents.VisualView.OnRelayout M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] + public async Task OnRelayout_CHECK_RERTURN_VALUE() + { + var myVisualView = new MyVisualView() + { + Size2D = new Size2D(300, 200), + BackgroundColor = Color.Cyan, + ParentOrigin = ParentOrigin.CenterRight, + PivotPoint = PivotPoint.CenterRight, + PositionUsesPivotPoint = true, + }; + + try + { + Assert.IsNotNull(myVisualView, "Can't create VisualView instance success"); + Assert.IsInstanceOf(myVisualView, "Should return VisualView instance."); + Window.Instance.Add(myVisualView); + TextVisual textVisualMap1 = new TextVisual() + { + Text = "Text Visual", + PointSize = 20.0f, + Size = new Size2D(250, 150), + SizePolicy = VisualTransformPolicyType.Absolute, + Origin = Visual.AlignType.Center, + AnchorPoint = Visual.AlignType.Center, + PositionPolicy = VisualTransformPolicyType.Absolute, + }; + myVisualView.AddVisual("textVisual", textVisualMap1); + await Task.Delay(200); + Assert.IsTrue(_flagOnRelayout, "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 + { + Window.Instance.Remove(myVisualView); + } + } + + [Test] + [Category("P1")] + [Description("Test VisualAnimate. Check visual count after remove all.")] + [Property("SPEC", "Tizen.NUI.BaseComponents.VisualView.VisualAnimate M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] + public void VisualAnimate_CHECK_RERTURN_VALUE() + { + var visualView = new VisualView() + { + Size2D = new Size2D(500, 400), + }; + + try + { + Assert.IsNotNull(visualView, "Can't create VisualView instance success"); + Assert.IsInstanceOf(visualView, "Should return VisualView instance."); + Window.Instance.Add(visualView); + + ColorVisual colorVisualMap1 = new ColorVisual() + { + Color = Color.Green, + Size = new Size2D(300, 200), + SizePolicy = VisualTransformPolicyType.Absolute, + Origin = Visual.AlignType.Center, + AnchorPoint = Visual.AlignType.Center, + PositionPolicy = VisualTransformPolicyType.Absolute, + }; + visualView.AddVisual("colorVisual", colorVisualMap1); + + VisualAnimator visualAnimator = new VisualAnimator() + { + AlphaFunction = AlphaFunction.BuiltinFunctions.Default, + StartTime = 0, + EndTime = 100, + Target = "colorVisual", + PropertyIndex = "Opacity", + DestinationValue = 0.5f, + }; + + Animation visualAnimation = visualView.VisualAnimate(visualAnimator); + Assert.IsNotNull(visualAnimation, "Can't return Animation instance success"); + Assert.IsInstanceOf(visualAnimation, "Should return Animation instance."); + visualAnimation.Play(); + } + 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(visualView); + } + } + + internal class MyVisualView : VisualView + { + public MyVisualView() : base() + { } + + public override void OnInitialize() + { + base.OnInitialize(); + } + + public override void OnRelayout(Vector2 size, RelayoutContainer container) + { + _flagOnRelayout = true; + base.OnRelayout(size, container); + } + } } } diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSWebView.WebViewEventArgs.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSWebView.WebViewEventArgs.cs new file mode 100755 index 0000000..a1b7db9 --- /dev/null +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSWebView.WebViewEventArgs.cs @@ -0,0 +1,77 @@ +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.WebView.WebViewEventArgs Tests")] + public class WebViewEventArgsTests + { + private string TAG = "NUI"; + + [SetUp] + public void Init() + { + Tizen.Log.Info(TAG, "Init() is called!"); + App.MainTitleChangeText("WebViewEventArgsTests"); + App.MainTitleChangeBackgroundColor(null); + } + + [TearDown] + public void Destroy() + { + Tizen.Log.Info(TAG, "Destroy() is called!"); + } + + [Test] + [Category("P1")] + [Description("Create a WebViewEventArgs object. Check whether WebViewEventArgs is successfully created or not.")] + [Property("SPEC", "Tizen.NUI.WebView.WebViewEventArgs C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] + public void WebViewEventArgs_INIT() + { + /* TEST CODE */ + var webViewEventArgs = new WebView.WebViewEventArgs(); + Assert.IsNotNull(webViewEventArgs, "Can't create success object WebViewEventArgs"); + Assert.IsInstanceOf(webViewEventArgs, "Should be an instance of WebViewEventArgs type."); + } + + [Test] + [Category("P1")] + [Description("Test WebView. Check whether WebView is readable and writable.")] + [Property("SPEC", "Tizen.NUI.WebView.WebViewEventArgs.WebView A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] + public void WebView_SET_GET_VALUE() + { + /* TEST CODE */ + var webViewEventArgs = new WebView.WebViewEventArgs(); + WebView webView = new WebView(); + webViewEventArgs.WebView = webView; + Assert.AreEqual(webView, webViewEventArgs.WebView, "Retrieved WebView should be equal to set value"); + } + + [Test] + [Category("P1")] + [Description("Test PageUrl. Check whether PageUrl is readable and writable.")] + [Property("SPEC", "Tizen.NUI.WebView.WebViewEventArgs.PageUrl A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] + public void PageUrl_SET_GET_VALUE() + { + /* TEST CODE */ + var webViewEventArgs = new WebView.WebViewEventArgs(); + string webUrl = "www.samsung.com"; + webViewEventArgs.PageUrl = webUrl; + Assert.AreEqual(webUrl, webViewEventArgs.PageUrl, "Retrieved PageUrl should be equal to set value"); + } + } +} -- 2.7.4