[NUI][Non-ACR][Update TCTs for Tizen.NUI] 01/191201/14
authorwenfeng.ge <wenfeng.ge@samsung.com>
Fri, 12 Oct 2018 11:05:17 +0000 (19:05 +0800)
committerxb.teng <xb.teng@samsung.com>
Fri, 19 Oct 2018 03:29:14 +0000 (11:29 +0800)
- To make coverage rate 100%, add some testcases for remain apis, don't have ACR or require TCT

Change-Id: I841e842c1b3f12e128760dd921f9b52f97057c67
Signed-off-by: wenfeng.ge <wenfeng.ge@samsung.com>
40 files changed:
tct-suite-vs/Tizen.NUI.Tests/res/demoVideo.mp4 [new file with mode: 0755]
tct-suite-vs/Tizen.NUI.Tests/testcase/TSAdaptor.cs [new file with mode: 0755]
tct-suite-vs/Tizen.NUI.Tests/testcase/TSAnimatedImageVisual.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSBaseHandle.FocusRequestArgs.cs [new file with mode: 0755]
tct-suite-vs/Tizen.NUI.Tests/testcase/TSBindableProperty.cs [new file with mode: 0755]
tct-suite-vs/Tizen.NUI.Tests/testcase/TSBorderVisual.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSColorVisual.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSCustomView.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSFocusManager.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSGetResourcesProvider.cs [new file with mode: 0755]
tct-suite-vs/Tizen.NUI.Tests/testcase/TSGradientVisual.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSHover.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSImageVisual.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSImfManager.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSLongPressGesture.cs [new file with mode: 0755]
tct-suite-vs/Tizen.NUI.Tests/testcase/TSMeshVisual.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSNPatchVisual.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSPanGesture.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSPinchGesture.cs [new file with mode: 0755]
tct-suite-vs/Tizen.NUI.Tests/testcase/TSPopup.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSPosition2D.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSPrimitiveVisual.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSPropertyArray.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSSVGVisual.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSScrollBar.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSScrollView.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSScrollable.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSSlider.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSTapGesture.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextLabel.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextVisual.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSTouch.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSVideoView.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSView.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSVisualAnimator.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSVisualMap.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSWatchTime.cs [new file with mode: 0755]
tct-suite-vs/Tizen.NUI.Tests/testcase/TSWindow.SafeNativeWindowHandle.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSWindow.WindowFocusChangedEventArgs.cs [new file with mode: 0755]
tct-suite-vs/Tizen.NUI.Tests/testcase/TSWindow.cs

diff --git a/tct-suite-vs/Tizen.NUI.Tests/res/demoVideo.mp4 b/tct-suite-vs/Tizen.NUI.Tests/res/demoVideo.mp4
new file mode 100755 (executable)
index 0000000..9232219
Binary files /dev/null and b/tct-suite-vs/Tizen.NUI.Tests/res/demoVideo.mp4 differ
diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSAdaptor.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSAdaptor.cs
new file mode 100755 (executable)
index 0000000..feaed50
--- /dev/null
@@ -0,0 +1,97 @@
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using System;
+using Tizen.NUI;
+using Tizen.NUI.Test;
+
+namespace Tizen.NUI.Tests
+{
+
+    [TestFixture]
+    [Description("Tizen.NUI.Adaptor Tests")]
+    public class AdaptorTests
+    {
+        private static string TAG = "NUI";
+
+        [SetUp]
+        public void Init()
+        {
+            Tizen.Log.Info(TAG, "Init() is called!");
+            App.MainTitleChangeText("AdaptorTests");
+            App.MainTitleChangeBackgroundColor(null);
+        }
+
+        [TearDown]
+        public void Destroy()
+        {
+            Tizen.Log.Info(TAG, "Destroy() is called!");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test Instance. Check whether Instance returns expected value or not.")]
+        [Property("SPEC", "Tizen.NUI.Adaptor.Instance A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public void Instance_GET_VALUE()
+        {
+            /* TEST CODE */
+            Adaptor adaptor = Adaptor.Instance;
+            Assert.IsInstanceOf<Adaptor>(adaptor, "Should be an Instance of Adaptor!");
+        }\r
+\r
+        [Test]
+        [Category("P1")]
+        [Description("Test FeedKeyEvent.")]
+        [Property("SPEC", "Tizen.NUI.Adaptor.FeedKeyEvent M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public void FeedKeyEvent_TEST()
+        {
+            /* TEST CODE */
+            try
+            {
+                Key key = new Key()\r
+                {\r
+                    KeyPressedName = "Up",\r
+                    State = Key.StateType.Down,\r
+                };
+                Adaptor adaptor = Adaptor.Instance;
+                adaptor.FeedKeyEvent(key);
+            }
+            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 FeedWheelEvent.")]
+        [Property("SPEC", "Tizen.NUI.Adaptor.FeedWheelEvent M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public void FeedWheelEvent_TEST()
+        {
+            /* TEST CODE */
+            try
+            {
+                Vector2 point = new Vector2(1.0f, 1.0f);\r
+                Wheel wheel = new Wheel(Wheel.WheelType.MouseWheel, 1, 0x2, point, 1, 1000u);
+                Adaptor adaptor = Adaptor.Instance;
+                adaptor.FeedWheelEvent(wheel);
+            }
+            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());
+            }
+        }
+    }
+}
index bdcb060290831d0c7f1d61a71a06932878d0e15e..21bb0cf3d62d983469b9c3be47759c587d990f7d 100755 (executable)
@@ -13,9 +13,18 @@ namespace Tizen.NUI.Tests
     {
         private static string TAG = "NUI";
         private static string image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
+        private static bool _flagComposingPropertyMap;
+        internal class MyAnimatedImageVisual : AnimatedImageVisual
+        {
+            protected override void ComposingPropertyMap()
+            {
+                _flagComposingPropertyMap = true;
+                base.ComposingPropertyMap();
+            }
+        }
 
         [SetUp]
-        public static void Init()
+        public void Init()
         {
             Tizen.Log.Info(TAG, "Init() is called!");
             App.MainTitleChangeText("AnimatedImageVisualTests");
@@ -23,7 +32,7 @@ namespace Tizen.NUI.Tests
         }
 
         [TearDown]
-        public static void Destroy()
+        public void Destroy()
         {
             Tizen.Log.Info(TAG, "Destroy() is called!");
         }
@@ -148,5 +157,29 @@ namespace Tizen.NUI.Tests
             Assert.AreEqual(image_path, url, "Retrieved URLS should be equal to set value");
         }
 
+        [Test]
+        [Category("P1")]
+        [Description("Check override method ComposingPropertyMap is invoked when new AnimatedImageVisual instance.")]
+        [Property("SPEC", "Tizen.NUI.AnimatedImageVisual.ComposingPropertyMap M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
+        public void ComposingPropertyMap_OVERRIDE_METHOD()
+        {
+            /*PRE CONDITION
+             * _flagComposingPropertyMap flag is initialize false value
+             * Create a instance MyAnimatedImageVisual
+             */
+            _flagComposingPropertyMap = false;
+            Assert.False(_flagComposingPropertyMap, "_flagComposingPropertyMap should false initial");
+            /**TEST CODE**/
+            var myAnimatedImageVisual = new MyAnimatedImageVisual()
+            {
+                URL = image_path,
+            };
+            Assert.IsInstanceOf<AnimatedImageVisual>(myAnimatedImageVisual, "Should be an instance of AnimatedImageVisual type.");
+            PropertyMap propertyMap = myAnimatedImageVisual.OutputVisualMap;
+            Assert.True(_flagComposingPropertyMap, "ComposingPropertyMap overrided method not invoked.");
+        }
     }
 }
diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSBaseHandle.FocusRequestArgs.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSBaseHandle.FocusRequestArgs.cs
new file mode 100755 (executable)
index 0000000..df264b6
--- /dev/null
@@ -0,0 +1,79 @@
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using System;
+using Tizen.NUI.Test;
+
+namespace Tizen.NUI.Tests
+{
+    [TestFixture]
+    [Description("Tizen.NUI.BaseHandle.FocusRequestArgs Tests")]
+    public class FocusRequestArgsTests
+    {
+        private static string TAG = "NUI";
+
+        [SetUp]
+        public void Init()
+        {
+            Tizen.Log.Info(TAG, "Init() is called!");
+            App.MainTitleChangeText("FocusRequestArgsTests");
+            App.MainTitleChangeBackgroundColor(null);
+        }
+
+        [TearDown]
+        public void Destroy()
+        {
+            Tizen.Log.Info(TAG, "Destroy() is called!");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Create a FocusRequestArgs object. Check whether FocusRequestArgs is successfully created or not.")]
+        [Property("SPEC", "Tizen.NUI.BaseHandle.FocusRequestArgs.FocusRequestArgs C")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "CONSTR")]
+        [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
+        public void FocusRequestArgs_INIT()
+        {
+            /* TEST CODE */
+            var focusRequestArgs = new BaseHandle.FocusRequestArgs();
+            Assert.IsNotNull(focusRequestArgs, "Can't create success object FocusRequestArgs");
+            Assert.IsInstanceOf<BaseHandle.FocusRequestArgs>(focusRequestArgs, "Should be an instance of FocusRequestArgs type.");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test Focus. Check whether Focus is readable and writable.")]
+        [Property("SPEC", "Tizen.NUI.BaseHandle.FocusRequestArgs.Focus A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA","PRW")]
+        [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
+        public void Focus_SET_GET_VALUE()
+        {
+            /* TEST CODE */
+            BaseHandle.FocusRequestArgs focusRequestArgs = new BaseHandle.FocusRequestArgs();
+            focusRequestArgs.Focus = true;
+            Assert.AreEqual(true, focusRequestArgs.Focus, "Retrieved Focus should be equal to set value");
+
+            focusRequestArgs.Focus = false;
+            Assert.AreEqual(false, focusRequestArgs.Focus, "Retrieved Focus should be equal to set value");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test Result. Check whether Result is readable and writable.")]
+        [Property("SPEC", "Tizen.NUI.BaseHandle.FocusRequestArgs.Result A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA","PRW")]
+        [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
+        public void Result_SET_GET_VALUE()
+        {
+            /* TEST CODE */
+            BaseHandle.FocusRequestArgs focusRequestArgs = new BaseHandle.FocusRequestArgs();
+            focusRequestArgs.Result = true;
+            Assert.AreEqual(true, focusRequestArgs.Result, "Retrieved Result should be equal to set value");
+
+            focusRequestArgs.Result = false;
+            Assert.AreEqual(false, focusRequestArgs.Result, "Retrieved Result should be equal to set value");
+        }
+    }
+}
diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSBindableProperty.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSBindableProperty.cs
new file mode 100755 (executable)
index 0000000..7c63179
--- /dev/null
@@ -0,0 +1,329 @@
+using System;
+using System.Linq.Expressions;
+using NUnit.Framework;
+using Tizen.NUI.Binding;
+using Tizen.NUI.UIComponents;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Tests
+{
+    [TestFixture]
+    [Description("Tizen.NUI.Binding.BindableProperty Tests")]
+    public class BindablePropertyTests
+    {
+        [SetUp]
+        public void Setup()
+        {
+            Console.WriteLine("BindablePropertyTests --------------- Setup()");
+        }
+
+        [TearDown]
+        public void TearDown()
+        {
+            Console.WriteLine("BindablePropertyTests --------------- TearDown()");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Check the type declaring the BindableProperty.")]
+        [Property("SPEC", "Tizen.NUI.Binding.BindableProperty.DeclaringType A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Feng Jin, feng16.jin@partner.samsung.com")]
+        public void DeclaringType_READ_ONLY()
+        {
+            /* TEST CODE */
+            BindableProperty bindableProperty = BindableProperty.Create("Tizen", typeof(string), typeof(string), "TizenNew", BindingMode.Default, null, null,
+                null, null, null);
+            Assert.IsInstanceOf<Type>(bindableProperty.DeclaringType, "Should be instance of Type.");
+            Assert.AreEqual(bindableProperty.DeclaringType, typeof(string), "Not returning expected type.");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Check the value for BindingMode.")]
+        [Property("SPEC", "Tizen.NUI.Binding.BindableProperty.DefaultBindingMode A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Feng Jin, feng16.jin@partner.samsung.com")]
+        public void DefaultBindingMode_READ_ONLY()
+        {
+            /* TEST CODE */
+            BindableProperty bindableProperty = BindableProperty.Create("Tizen", typeof(string), typeof(string), "TizenNew", BindingMode.TwoWay, null, null,
+                null, null, null);
+            Assert.IsInstanceOf<BindingMode>(bindableProperty.DefaultBindingMode, "Should be instance of BindingMode.");
+            Assert.AreEqual(bindableProperty.DefaultBindingMode, BindingMode.TwoWay, "Not returning expected Value.");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Check the value for BindableProperty.")]
+        [Property("SPEC", "Tizen.NUI.Binding.BindableProperty.DefaultValue A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Feng Jin, feng16.jin@partner.samsung.com")]
+        public void DefaultValue_READ_ONLY()
+        {
+            /* TEST CODE */
+            BindableProperty bindableProperty = BindableProperty.Create("Tizen", typeof(string), typeof(string), "TizenNew", BindingMode.TwoWay, null, null,
+                null, null, null);
+            Assert.IsInstanceOf<Object>(bindableProperty.DefaultValue, "Should be instance of Object.");
+            Assert.AreEqual(bindableProperty.DefaultValue, "TizenNew", "Not returning expected Value.");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Check if BindableProperty is created form a BindablePropertyKey.")]
+        [Property("SPEC", "Tizen.NUI.Binding.BindableProperty.IsReadOnly A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Feng Jin, feng16.jin@partner.samsung.com")]
+        public void IsReadOnly_READ_ONLY()
+        {
+            /* TEST CODE */
+            BindableProperty bindableProperty = BindableProperty.Create("Tizen", typeof(string), typeof(string), "TizenNew", BindingMode.TwoWay, null, null,
+                null, null, null);
+            Assert.IsInstanceOf<Boolean>(bindableProperty.IsReadOnly, "Should be instance of Boolean.");
+            Assert.IsFalse(bindableProperty.IsReadOnly, "BindableProperty should not be readonly.");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Check the property name.")]
+        [Property("SPEC", "Tizen.NUI.Binding.BindableProperty.PropertyName A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Feng Jin, feng16.jin@partner.samsung.com")]
+        public void PropertyName_READ_ONLY()
+        {
+            /* TEST CODE */
+            BindableProperty bindableProperty = BindableProperty.Create("Tizen", typeof(string), typeof(string), "TizenNew", BindingMode.TwoWay, null, null,
+                 null, null, null);
+            Assert.IsInstanceOf<String>(bindableProperty.PropertyName, "Should be instance of String.");
+            Assert.AreEqual(bindableProperty.PropertyName, "Tizen", "Not returning proper value.");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Check the type of the BindableProperty.")]
+        [Property("SPEC", "Tizen.NUI.Binding.BindableProperty.ReturnType A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Feng Jin, feng16.jin@partner.samsung.com")]
+        public void ReturnType_READ_ONLY()
+        {
+            /* TEST CODE */
+            BindableProperty bindableProperty = BindableProperty.Create("Tizen", typeof(string), typeof(string), "TizenNew", BindingMode.TwoWay, null, null,
+                 null, null, null);
+            Assert.IsInstanceOf<Type>(bindableProperty.ReturnType, "Should be instance of Type.");
+            Assert.AreEqual(bindableProperty.ReturnType, typeof(string), "Not returning proper Value.");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Creates a new instance of the BindableProperty class.")]
+        [Property("SPEC", "Tizen.NUI.Binding.BindableProperty.Create M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Feng Jin, feng16.jin@partner.samsung.com")]
+        public void Create_CHECK_INSTANCE_CREATE_DEFAULT_VALUE_DELEGATE()
+        {
+            /* TEST CODE */
+            var bindableProperty = BindableProperty.Create("Tizen", typeof(string), typeof(string), "TizenNew", BindingMode.TwoWay, null, null,
+                 null, null, null);
+            Assert.IsNotNull(bindableProperty, "Instance is null");
+            Assert.IsInstanceOf<BindableProperty>(bindableProperty, "Should be instance of BindableProperty.");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Creates a new instance of the BindableProperty class.")]
+        [Property("SPEC", "Tizen.NUI.Binding.BindableProperty.Create M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Feng Jin, feng16.jin@partner.samsung.com")]
+        public void Create_CHECK_INSTANCE_STRING()
+        {
+            /* TEST CODE */
+            var bindableProperty = BindableProperty.Create("Tizen", typeof(string), typeof(string), "TizenNew", BindingMode.TwoWay, null, null,
+                 null, null);
+            Assert.IsNotNull(bindableProperty, "BindableProperty instance is null");
+            Assert.IsInstanceOf<BindableProperty>(bindableProperty, "Should be instance of BindableProperty.");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Creates a new instance of the BindableProperty class.")]
+        [Property("SPEC", "Tizen.NUI.Binding.BindableProperty.Create<TDeclarer,TPropertyType> M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Feng Jin, feng16.jin@partner.samsung.com")]
+        public void Create_CHECK_INSTANCE_EXPRESSION()
+        {
+            /* TEST CODE */
+            var bindableProperty = BindableProperty.Create<PushButton, string>(b => b.LabelText, null, BindingMode.TwoWay);
+            Assert.IsNotNull(bindableProperty, "BindableProperty instance is null");
+            Assert.IsInstanceOf<BindableProperty>(bindableProperty, "Should be instance of BindableProperty.");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Creates a new instance of the BindableProperty class.")]
+        [Property("SPEC", "Tizen.NUI.Binding.BindableProperty.Create<TDeclarer,TPropertyType> M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Feng Jin, feng16.jin@partner.samsung.com")]
+        public void Create_CHECK_INSTANCE_EXPRESSION_CREATE_DEFAULT_VALUE_DELEGATE()
+        {
+            /* TEST CODE */
+            BindableProperty.ValidateValueDelegate<string> validateValueDelegate = (b, v) => true;
+            BindableProperty.BindingPropertyChangedDelegate<string> changedDelegate = (b, ov, nv) => { };
+            BindableProperty.BindingPropertyChangingDelegate<string> changingDelegate = (b, ov, nv) => { };
+            BindableProperty.CoerceValueDelegate<string> coerceValueDelegate = (bindable, value) => value;
+
+            var bindableProperty = BindableProperty.Create<PushButton, string>(b => b.LabelText, null, BindingMode.TwoWay, validateValueDelegate, changedDelegate, changingDelegate, coerceValueDelegate);
+            Assert.IsNotNull(bindableProperty, "BindableProperty instance is null");
+            Assert.IsInstanceOf<BindableProperty>(bindableProperty, "Should be instance of BindableProperty.");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Creates a new instance of the BindableProperty class for an attached property.")]
+        [Property("SPEC", "Tizen.NUI.Binding.BindableProperty.CreateAttached M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Feng Jin, feng16.jin@partner.samsung.com")]
+        public void CreateAttached_CHECK_INSTANCE_CREATE_DEFAULT_VALUE_DELEGATE()
+        {
+            /* TEST CODE */
+            var bindableProperty = BindableProperty.CreateAttached("Tizen", typeof(string), typeof(string), "TizenNew");
+            Assert.IsNotNull(bindableProperty, "BindableProperty instance is null");
+            Assert.IsInstanceOf<BindableProperty>(bindableProperty, "Should be instance of BindableProperty.");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Creates a new instance of the BindableProperty class for an attached property.")]
+        [Property("SPEC", "Tizen.NUI.Binding.BindableProperty.CreateAttached M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Feng Jin, feng16.jin@partner.samsung.com")]
+        public void CreateAttached_CHECK_INSTANCE_STRING()
+        {
+            /* TEST CODE */
+            BindableProperty.ValidateValueDelegate validateValueDelegate = (b, v) => true;
+            BindableProperty.BindingPropertyChangedDelegate changedDelegate = (b, ov, nv) => { };
+            BindableProperty.BindingPropertyChangingDelegate changingDelegate = (b, ov, nv) => { };
+            BindableProperty.CoerceValueDelegate coerceValueDelegate = (bindable, value) => value;
+
+            var bindableProperty = BindableProperty.CreateAttached("Tizen", typeof(string), typeof(string), "TizenNew", BindingMode.TwoWay, validateValueDelegate, changedDelegate, changingDelegate, coerceValueDelegate);
+            Assert.IsNotNull(bindableProperty, "BindableProperty instance is null");
+            Assert.IsInstanceOf<BindableProperty>(bindableProperty, "Should be instance of BindableProperty.");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Creates a new instance of the BindableProperty class for attached read-only properties.")]
+        [Property("SPEC", "Tizen.NUI.Binding.BindableProperty.CreateAttachedReadOnly M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Feng Jin, feng16.jin@partner.samsung.com")]
+        public void CreateAttachedReadOnly_CHECK_INSTANCE_CREATE_DEFAULT_VALUE_DELEGATE()
+        {
+            /* TEST CODE */
+            var bindableProperty = BindableProperty.CreateAttachedReadOnly("Tizen", typeof(string), typeof(string), "TizenNew", BindingMode.TwoWay);
+            Assert.IsNotNull(bindableProperty, "BindableProperty instance is null");
+            Assert.IsInstanceOf<BindablePropertyKey>(bindableProperty, "Should be instance of BindableProperty.");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Creates a new instance of the BindableProperty class for attached read-only properties.")]
+        [Property("SPEC", "Tizen.NUI.Binding.BindableProperty.CreateAttachedReadOnly M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Feng Jin, feng16.jin@partner.samsung.com")]
+        public void CreateAttachedReadOnly_CHECK_INSTANCE_STRING()
+        {
+            /* TEST CODE */
+            BindableProperty.ValidateValueDelegate validateValueDelegate = (b, v) => true;
+            BindableProperty.BindingPropertyChangedDelegate changedDelegate = (b, ov, nv) => { };
+            BindableProperty.BindingPropertyChangingDelegate changingDelegate = (b, ov, nv) => { };
+            BindableProperty.CoerceValueDelegate coerceValueDelegate = (bindable, value) => value;
+
+            var bindableProperty = BindableProperty.CreateAttachedReadOnly("Tizen", typeof(string), typeof(string), "TizenNew", BindingMode.TwoWay, validateValueDelegate, changedDelegate, changingDelegate, coerceValueDelegate);
+            Assert.IsNotNull(bindableProperty, "BindableProperty instance is null");
+            Assert.IsInstanceOf<BindablePropertyKey>(bindableProperty, "Should be instance of BindableProperty.");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Creates a new instance of the BindablePropertyKey class.")]
+        [Property("SPEC", "Tizen.NUI.Binding.BindableProperty.CreateReadOnly M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Feng Jin, feng16.jin@partner.samsung.com")]
+        public void CreateReadOnly_CHECK_INSTANCE_CREATE_DEFAULT_VALUE_DELEGATE()
+        {
+            /* TEST CODE */
+            var bindableProperty = BindableProperty.CreateReadOnly("Tizen", typeof(string), typeof(string), "TizenNew", BindingMode.TwoWay);
+            Assert.IsNotNull(bindableProperty, "BindableProperty instance is null");
+            Assert.IsInstanceOf<BindablePropertyKey>(bindableProperty, "Should be instance of BindableProperty.");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Creates a new instance of the BindablePropertyKey class.")]
+        [Property("SPEC", "Tizen.NUI.Binding.BindableProperty.CreateReadOnly M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Feng Jin, feng16.jin@partner.samsung.com")]
+        public void CreateReadOnly_CHECK_INSTANCE_STRING()
+        {
+            /* TEST CODE */
+            BindableProperty.ValidateValueDelegate validateValueDelegate = (b, v) => true;
+            BindableProperty.BindingPropertyChangedDelegate changedDelegate = (b, ov, nv) => { };
+            BindableProperty.BindingPropertyChangingDelegate changingDelegate = (b, ov, nv) => { };
+            BindableProperty.CoerceValueDelegate coerceValueDelegate = (bindable, value) => value;
+
+            var bindableProperty = BindableProperty.CreateReadOnly("Tizen", typeof(string), typeof(string), "TizenNew", BindingMode.TwoWay, validateValueDelegate, changedDelegate, changingDelegate, coerceValueDelegate);
+            Assert.IsNotNull(bindableProperty, "BindableProperty instance is null");
+            Assert.IsInstanceOf<BindablePropertyKey>(bindableProperty, "Should be instance of BindableProperty.");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Creates a new instance of the BindablePropertyKey class.")]
+        [Property("SPEC", "Tizen.NUI.Binding.BindableProperty.CreateReadOnly<TDeclarer,TPropertyType> M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Feng Jin, feng16.jin@partner.samsung.com")]
+        public void CreateReadOnly_CHECK_INSTANCE_EXPRESSION()
+        {
+            /* TEST CODE */
+            BindableProperty.ValidateValueDelegate<string> validateValueDelegate = (b, v) => true;
+            BindableProperty.BindingPropertyChangedDelegate<string> changedDelegate = (b, ov, nv) => { };
+            BindableProperty.BindingPropertyChangingDelegate<string> changingDelegate = (b, ov, nv) => { };
+            BindableProperty.CoerceValueDelegate<string> coerceValueDelegate = (bindable, value) => value;
+
+            var bindableProperty = BindableProperty.CreateReadOnly<PushButton, string>(b => b.LabelText, "Tizen", BindingMode.TwoWay, validateValueDelegate, changedDelegate, changingDelegate, coerceValueDelegate);
+            Assert.IsNotNull(bindableProperty, "BindableProperty instance is null");
+            Assert.IsInstanceOf<BindablePropertyKey>(bindableProperty, "Should be instance of BindableProperty.");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Creates a new instance of the BindablePropertyKey class.")]
+        [Property("SPEC", "Tizen.NUI.Binding.BindableProperty.CreateReadOnly<TDeclarer,TPropertyType> M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Feng Jin, feng16.jin@partner.samsung.com")]
+        public void CreateReadOnly_CHECK_INSTANCE_EXPRESSION_CREATE_DEFAULT_VALUE_DELEGATE()
+        {
+            /* TEST CODE */
+            var bindableProperty = BindableProperty.CreateReadOnly<PushButton, string>(b => b.LabelText, "Tizen", BindingMode.TwoWay);
+            Assert.IsNotNull(bindableProperty, "BindableProperty instance is null");
+            Assert.IsInstanceOf<BindablePropertyKey>(bindableProperty, "Should be instance of BindableProperty.");
+        }
+    }
+}
index 4b89247724581f8a57589af626df31c2440cceb1..908238b97c43098a843cc91536ea53f3f75d2802 100755 (executable)
@@ -11,9 +11,18 @@ namespace Tizen.NUI.Tests
     public class BorderVisualTests
     {
         private static string TAG = "NUI";
+        private static bool _flagComposingPropertyMap;
+        internal class MyBorderVisual : BorderVisual
+        {
+            protected override void ComposingPropertyMap()
+            {
+                _flagComposingPropertyMap = true;
+                base.ComposingPropertyMap();
+            }
+        }
 
         [SetUp]
-        public static void Init()
+        public void Init()
         {
             Tizen.Log.Info(TAG, " Init() is called!");
             App.MainTitleChangeText("BorderVisualTests");
@@ -22,7 +31,7 @@ namespace Tizen.NUI.Tests
         }
 
         [TearDown]
-        public static void Destroy()
+        public void Destroy()
         {
             Tizen.Log.Info(TAG, " Destroy() is called!");
         }
@@ -90,5 +99,31 @@ namespace Tizen.NUI.Tests
             borderVisualMap.AntiAliasing = true;
             Assert.AreEqual(true, borderVisualMap.AntiAliasing, "Retrieved AntiAliasing should be equal to set value");
         }
+
+        [Test]
+        [Category("P1")]
+        [Description("Check override method ComposingPropertyMap is invoked when new BorderVisual instance.")]
+        [Property("SPEC", "Tizen.NUI.BorderVisual.ComposingPropertyMap M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
+        public void ComposingPropertyMap_OVERRIDE_METHOD()
+        {
+            /*PRE CONDITION
+             * _flagComposingPropertyMap flag is initialize false value
+             * Create a instance MyBorderVisual
+             */
+            _flagComposingPropertyMap = false;
+            Assert.False(_flagComposingPropertyMap, "_flagComposingPropertyMap should false initial");
+            /**TEST CODE**/
+            var myBorderVisual = new MyBorderVisual()
+            {
+                Color = new Color(1.0f, 0.3f, 0.5f, 1.0f),
+                BorderSize = 1.0f,
+            };
+            Assert.IsInstanceOf<BorderVisual>(myBorderVisual, "Should be an instance of BorderVisual type.");
+            PropertyMap propertyMap = myBorderVisual.OutputVisualMap;
+            Assert.True(_flagComposingPropertyMap, "ComposingPropertyMap overrided method not invoked.");
+        }
     }
 }
index 3bd60912aba19ed34ed247f7ac407637817bb9b9..3386a1ebf463574ac1cc99c6f57b58a739c70697 100755 (executable)
@@ -11,9 +11,18 @@ namespace Tizen.NUI.Tests
     public class ColorVisualTests
     {
         private static string TAG = "NUI";
+        private static bool _flagComposingPropertyMap;
+        internal class MyColorVisual : ColorVisual
+        {
+            protected override void ComposingPropertyMap()
+            {
+                _flagComposingPropertyMap = true;
+                base.ComposingPropertyMap();
+            }
+        }
 
         [SetUp]
-        public static void Init()
+        public void Init()
         {
             Tizen.Log.Info(TAG, " Init() is called!");
             App.MainTitleChangeText("ColorVisualTests");
@@ -21,7 +30,7 @@ namespace Tizen.NUI.Tests
         }
 
         [TearDown]
-        public static void Destroy()
+        public void Destroy()
         {
             Tizen.Log.Info(TAG, " Destroy() is called!");
         }
@@ -77,5 +86,30 @@ namespace Tizen.NUI.Tests
             colorVisualMap.RenderIfTransparent = false;
             Assert.AreEqual(false, colorVisualMap.RenderIfTransparent, "Retrieved RenderIfTransparent should be equal to set value");
         }
+
+        [Test]
+        [Category("P1")]
+        [Description("Check override method ComposingPropertyMap is invoked when new ColorVisual instance.")]
+        [Property("SPEC", "Tizen.NUI.ColorVisual.ComposingPropertyMap M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
+        public void ComposingPropertyMap_OVERRIDE_METHOD()
+        {
+            /*PRE CONDITION
+             * _flagComposingPropertyMap flag is initialize false value
+             * Create a instance MyColorVisual
+             */
+            _flagComposingPropertyMap = false;
+            Assert.False(_flagComposingPropertyMap, "_flagComposingPropertyMap should false initial");
+            /**TEST CODE**/
+            var myColorVisual = new MyColorVisual()
+            {
+                Color = new Color(1.0f, 0.3f, 0.5f, 1.0f),
+            };
+            Assert.IsInstanceOf<ColorVisual>(myColorVisual, "Should be an instance of ColorVisual type.");
+            PropertyMap propertyMap = myColorVisual.OutputVisualMap;
+            Assert.True(_flagComposingPropertyMap, "ComposingPropertyMap overrided method not invoked.");
+        }
     }
 }
index 3593b41d3b2083b61ac303cd3b1e664e0a57502d..7dfb49df3b09703fe23223632ca132dc02b7ff4d 100755 (executable)
@@ -224,22 +224,341 @@ namespace Tizen.NUI.Tests
 
         [Test]
         [Category("P1")]
-        [Description("Test Dispose, try to dispose the CustomView.")]
-        [Property("SPEC", "Tizen.NUI.BaseComponents.CustomView.Dispose M")]
+        [Description("Test CalculateChildSizeBase, try to calculate the size for a child using the base view object")]
+        [Property("SPEC", "Tizen.NUI.BaseComponents.CustomView.CalculateChildSizeBase M")]
         [Property("SPEC_URL", "-")]
-        [Property("CRITERIA", "MR MCST")]
-        [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")]
-        public void Dispose_TEST()
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Junqing Ma, junqing.ma@samsung.com")]
+        public void CalculateChildSizeBase_CHECK_RETURN_VALUE()
+        {
+            /* TEST CODE */
+            View child = new View();
+            child.Size2D = new Size2D(150, 150);
+
+            MyCustomView custom = new MyCustomView();
+            custom.Size2D = new Size2D(0, 0);
+
+            float v = custom.CalculateChildSize(child, DimensionType.AllDimensions);
+            Assert.AreEqual(0.0f, v, "The child size of CustomView is not correct here.");
+
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test CreateTransition, try to create transition effect on the control")]
+        [Property("SPEC", "Tizen.NUI.BaseComponents.CustomView.CreateTransition M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Junqing Ma, junqing.ma@samsung.com")]
+        public void CreateTransition_TEST()
+        {
+            /* TEST CODE */
+            MyCustomView view = new MyCustomView();
+
+            PropertyMap animator = new PropertyMap();
+            animator.Add("alphaFunction", new PropertyValue("LINEAR"));
+
+            PropertyMap timePeriod = new PropertyMap();
+            timePeriod.Add("duration", new PropertyValue(0.8f));
+            timePeriod.Add("delay", new PropertyValue(0.0f));
+            animator.Add("timePeriod", new PropertyValue(timePeriod));
+
+            PropertyMap _transition = new PropertyMap();
+            _transition.Add("target", new PropertyValue("testVisual"));
+            _transition.Add("property", new PropertyValue("pixelArea"));
+            _transition.Add("targetValue", new PropertyValue(new Vector4(0, 0, 0, 1)));
+            _transition.Add("targetValue", new PropertyValue(new Vector4(0, 0, 1, 1)));
+            _transition.Add("animator", new PropertyValue(animator));
+
+            var transitionData = new TransitionData(_transition);
+            Assert.IsNotNull(transitionData, "The transitionData shouldn't be null");
+            Animation animation = view._CreateTransition(transitionData);
+            Assert.IsInstanceOf<Animation>(animation, "Should return Animation instance.");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test EmitFocusSignal, try to emits the KeyInputFocusGained signal if true")]
+        [Property("SPEC", "Tizen.NUI.BaseComponents.CustomView.EmitFocusSignal M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Junqing Ma, junqing.ma@samsung.com")]
+        public void EmitFocusSignal_TEST()
         {
             /* TEST CODE */
             try
             {
-                CustomView customView = new CustomView("CustomView", CustomViewBehaviour.DisableSizeNegotiation);
-                customView.Dispose();
+                MyCustomView view = new MyCustomView();
+                view._EmitFocusSignal(false);
+            }
+            catch(Exception e)
+            {
+                Tizen.Log.Error("Test CustomView.cs", "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 EnableVisual, try to sets the given visual to be displayed or not when parent staged")]
+        [Property("SPEC", "Tizen.NUI.BaseComponents.CustomView.EnableVisual M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Junqing Ma, junqing.ma@samsung.com")]
+        public void EnableVisual_TEST()
+        {
+            /* TEST CODE */
+            try
+            {
+                MyCustomView view = new MyCustomView();
+                view._EnableVisual(0, true);
             }
             catch (Exception e)
             {
-                Tizen.Log.Error("Test CellPosition.cs", "Caught Exception" + e.ToString());
+                Tizen.Log.Error("Test CustomView.cs", "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 GetHeightForWidthBase, Check whether it return the right value")]
+        [Property("SPEC", "Tizen.NUI.BaseComponents.CustomView.GetHeightForWidthBase M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Junqing Ma, junqing.ma@samsung.com")]
+        public void GetHeightForWidthBase_CHECK_RETURN_VALUE()
+        {
+            /* TEST CODE */
+            MyCustomView view = new MyCustomView("CustomView", CustomViewBehaviour.DisableSizeNegotiation);
+            float height = view._GetHeightForWidth(1.0f);
+            Assert.AreEqual(1.0f, height, "The height of customView is not correct here.");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test GetVisual, Check whether it return the right value")]
+        [Property("SPEC", "Tizen.NUI.BaseComponents.CustomView.GetVisual M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Junqing Ma, junqing.ma@samsung.com")]
+        public void GetVisual_CHECK_RETURN_VALUE()
+        {
+            MyCustomView view = new MyCustomView("CustomView", CustomViewBehaviour.DisableSizeNegotiation);
+            VisualFactory visualfactory = VisualFactory.Instance;
+            PropertyMap map = new PropertyMap();
+            map.Insert(Visual.Property.Type, new PropertyValue((int)Visual.Type.Text));
+            map.Insert(Visual.Property.Type, new PropertyValue(""));
+            VisualBase visual = visualfactory.CreateVisual(map);
+            visual.Name = "test visual";
+
+            view._EnableVisual(0, true);
+            view._RegisterVisual(0, visual);
+            VisualBase ret = view._GetVisual(0);
+            Assert.AreEqual("test visual", ret.Name, "The visual get from CustomView is not correct here");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test GetWidthForHeightBase, Check whether it return the right value")]
+        [Property("SPEC", "Tizen.NUI.BaseComponents.CustomView.GetWidthForHeightBase M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Junqing Ma, junqing.ma@samsung.com")]
+        public void GetWidthForHeightBase_CHECK_RETURN_VALUE()
+        {
+            /* TEST CODE */
+            MyCustomView view = new MyCustomView("CustomView", CustomViewBehaviour.DisableSizeNegotiation);
+            float width = view._GetWidthForHeight(1.0f);
+            Assert.AreEqual(1.0f, width, "The width of customView is not correct here.");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test IsVisualEnabled, Check whether it return the right value")]
+        [Property("SPEC", "Tizen.NUI.BaseComponents.CustomView.IsVisualEnabled M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Junqing Ma, junqing.ma@samsung.com")]
+        public void IsVisualEnabled_CHECK_RETURN_VALUE()
+        {
+            /* TEST CODE */
+            MyCustomView view = new MyCustomView("CustomView", CustomViewBehaviour.DisableSizeNegotiation);
+
+            VisualFactory visualfactory = VisualFactory.Instance;
+            PropertyMap map = new PropertyMap();
+            map.Insert(Visual.Property.Type, new PropertyValue((int)Visual.Type.Text));
+            map.Insert(Visual.Property.Type, new PropertyValue(""));
+            VisualBase visual = visualfactory.CreateVisual(map);
+            visual.Name = "test visual";
+
+            view._EnableVisual(0, true);
+            view._RegisterVisual(0, visual);
+
+            bool ret = view._IsVisualEnabled(0);
+
+            Assert.AreEqual(true, ret, "The return value of CustomView is not correct here");
+        }
+
+
+
+        [Test]
+        [Category("P1")]
+        [Description("Test UnregisterVisual, try to unregister visual")]
+        [Property("SPEC", "Tizen.NUI.BaseComponents.CustomView.UnregisterVisual M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Junqing Ma, junqing.ma@samsung.com")]
+        public void UnregisterVisual_TEST()
+        {
+            /* TEST CODE */
+            MyCustomView view = new MyCustomView("CustomView", CustomViewBehaviour.DisableSizeNegotiation);
+
+            VisualFactory visualfactory = VisualFactory.Instance;
+            PropertyMap map = new PropertyMap();
+            map.Insert(Visual.Property.Type, new PropertyValue((int)Visual.Type.Text));
+            map.Insert(Visual.Property.Type, new PropertyValue(""));
+            VisualBase visual = visualfactory.CreateVisual(map);
+            visual.Name = "test visual";
+
+            view._EnableVisual(0, true);
+            view._EnableVisual(1, true);
+
+            try
+            {
+                view._RegisterVisual(0, visual);
+                view._RegisterVisual(1, visual, true);
+            }
+            catch (Exception e)
+            {
+                Tizen.Log.Error("Test CustomView.cs", "Caught Exception" + e.ToString());
+                LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+                Assert.Fail("Caught Exception" + e.ToString());
+            }
+
+            try
+            {
+                view._UnregisterVisual(0);
+                view._UnregisterVisual(1);
+            }
+            catch (Exception e)
+            {
+                Tizen.Log.Error("Test CustomView.cs", "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 RelayoutDependentOnChildrenBase. Check whether it return the right value")]
+        [Property("SPEC", "Tizen.NUI.BaseComponents.CustomView.RelayoutDependentOnChildrenBase M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("COVPARAM", "")]
+        [Property("AUTHOR", "Junqing Ma, junqing.ma@samsung.com")]
+        public void RelayoutDependentOnChildrenBase_CHECK_RETURN_VALUE()
+        {
+            /* TEST CODE */
+            MyCustomView view = new MyCustomView("CustomView", CustomViewBehaviour.DisableSizeNegotiation);
+            bool ret = view._RelayoutDependentOnChildren();
+            Assert.AreEqual(true, ret, "The return value should be true here.");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test RelayoutDependentOnChildrenBase. Check whether it return the right value")]
+        [Property("SPEC", "Tizen.NUI.BaseComponents.CustomView.RelayoutDependentOnChildrenBase M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("COVPARAM", "Tizen.NUI.DimensionType")]
+        [Property("AUTHOR", "Junqing Ma, junqing.ma@samsung.com")]
+        public void RelayoutDependentOnChildrenBase_WITH_DIMENSIONTYPE_CHECK_RETURN_VALUE()
+        {
+            /* TEST CODE */
+            MyCustomView view = new MyCustomView("CustomView", CustomViewBehaviour.DisableSizeNegotiation);
+            bool ret = view._RelayoutDependentOnChildren(DimensionType.AllDimensions);
+            Assert.AreEqual(true, ret, "The return value should be true here.");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test RelayoutRequest, try to request a relayout")]
+        [Property("SPEC", "Tizen.NUI.BaseComponents.CustomView.RelayoutRequest M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Junqing Ma, junqing.ma@samsung.com")]
+        public void RelayoutRequest_TEST()
+        {
+            /* TEST CODE */
+            try
+            {
+                MyCustomView view = new MyCustomView("CustomView", CustomViewBehaviour.DisableSizeNegotiation);
+                view._RelayoutRequest();
+            }
+            catch(Exception e)
+            {
+                Tizen.Log.Error("Test CustomView.cs", "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 RegisterVisual, try to register a visual")]
+        [Property("SPEC", "Tizen.NUI.BaseComponents.CustomView.RegisterVisual M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("COVPARAM", "int, Tizen.NUI.VisualBase")]
+        [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
+        public void RegisterVisual_TEST_PARAM2()
+        {
+            /* TEST CODE */
+            try
+            {
+                MyCustomView view = new MyCustomView("CustomView", CustomViewBehaviour.DisableSizeNegotiation);
+                int visualIndex = view.RegisterProperty("visualName", new PropertyValue("visualName"), PropertyAccessMode.ReadWrite);
+                ColorVisual colorVisual = new ColorVisual();
+                colorVisual.Color = new Color(1.0f, 0.3f, 0.5f, 1.0f);
+                VisualBase visual = VisualFactory.Instance.CreateVisual(colorVisual.OutputVisualMap);
+                view._RegisterVisual(visualIndex, visual);
+            }
+            catch (Exception e)
+            {
+                Tizen.Log.Error("Test CustomView.cs", "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 RegisterVisual, try to register a visual")]
+        [Property("SPEC", "Tizen.NUI.BaseComponents.CustomView.RegisterVisual M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("COVPARAM", "int, Tizen.NUI.VisualBase, bool")]
+        [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
+        public void RegisterVisual_TEST_PARAM3()
+        {
+            /* TEST CODE */
+            try
+            {
+                MyCustomView view = new MyCustomView("CustomView", CustomViewBehaviour.DisableSizeNegotiation);
+                int visualIndex = view.RegisterProperty("visualName", new PropertyValue("visualName"), PropertyAccessMode.ReadWrite);
+                ColorVisual colorVisual = new ColorVisual();
+                colorVisual.Color = new Color(1.0f, 0.3f, 0.5f, 1.0f);
+                VisualBase visual = VisualFactory.Instance.CreateVisual(colorVisual.OutputVisualMap);
+                view._RegisterVisual(visualIndex, visual, false);
+            }
+            catch (Exception e)
+            {
+                Tizen.Log.Error("Test CustomView.cs", "Caught Exception" + e.ToString());
                 LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
                 Assert.Fail("Caught Exception" + e.ToString());
             }
@@ -262,6 +581,10 @@ namespace Tizen.NUI.Tests
         {
         }
 
+        public MyCustomView(string typeName, CustomViewBehaviour behaviour) : base(typeName, behaviour)
+        {
+        }
+
         public override void OnInitialize()
         {
             view = new BaseComponents.View();
@@ -274,5 +597,76 @@ namespace Tizen.NUI.Tests
         {
             return new Size2D(200, 200);
         }
+
+        public override float CalculateChildSize(View child, DimensionType dimension)
+        {
+            return base.CalculateChildSizeBase(child, dimension);
+        }
+
+        public Animation _CreateTransition(TransitionData transitionData)
+        {
+            return base.CreateTransition(transitionData);
+        }
+
+        public void _EmitFocusSignal(bool focusGained)
+        {
+            base.EmitFocusSignal(focusGained);
+        }
+
+        public void _EnableVisual(int index, bool enable)
+        {
+            base.EnableVisual(index, enable);
+        }
+
+        public float _GetHeightForWidth(float width)
+        {
+            return base.GetHeightForWidthBase(width);
+        }
+
+        public VisualBase _GetVisual(int index)
+        {
+            return base.GetVisual(index);
+        }
+
+        public float _GetWidthForHeight(float height)
+        {
+            return base.GetWidthForHeightBase(height);
+        }
+
+        public bool _IsVisualEnabled(int index)
+        {
+            return base.IsVisualEnabled(index);
+        }
+
+        public void _RegisterVisual(int index, VisualBase visual)
+        {
+            base.RegisterVisual(index, visual);
+        }
+
+        public void _RegisterVisual(int index, VisualBase visual, bool enabled)
+        {
+            base.RegisterVisual(index, visual, enabled);
+        }
+
+        public bool _RelayoutDependentOnChildren(DimensionType dimension)
+        {
+            return base.RelayoutDependentOnChildrenBase(dimension);
+        }
+
+        public bool _RelayoutDependentOnChildren()
+        {
+            return base.RelayoutDependentOnChildrenBase();
+        }
+
+        public void _RelayoutRequest()
+        {
+            base.RelayoutRequest();
+        }
+
+        public void _UnregisterVisual(int index)
+        {
+            base.UnregisterVisual(index);
+        }
+
     }
 }
index f2d42f43d1402b811e1c5aa8db8a9eb5c11e747f..57a3c8d6b9b920cdce25b6f379c7ebc924f2b343 100755 (executable)
@@ -15,7 +15,7 @@ namespace Tizen.NUI.Tests
         private static string TAG = "NUI";
 
         [SetUp]
-        public static void Init()
+        public void Init()
         {
             Tizen.Log.Info(TAG, "Init() is called!");
             App.MainTitleChangeText("FocusManagerTests");
@@ -23,10 +23,12 @@ namespace Tizen.NUI.Tests
         }
 
         [TearDown]
-        public static void Destroy()
+        public void Destroy()
         {
             Tizen.Log.Info(TAG, "Destroy() is called!");
-        }
+        }\r
+        private void OnFocusGroupChanged(object obj, EventArgs e)\r
+        { }
 
         [Test]
         [Category("P1")]
@@ -354,7 +356,6 @@ namespace Tizen.NUI.Tests
             manager.SetCurrentFocusView(view2);
             Assert.IsTrue(flag, "FocusChanged is not be called");
         }
-
     }
 
     public class CustomFocusAlgorithm : FocusManager.ICustomFocusAlgorithm
diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSGetResourcesProvider.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSGetResourcesProvider.cs
new file mode 100755 (executable)
index 0000000..65b8b4d
--- /dev/null
@@ -0,0 +1,59 @@
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using System;
+using Tizen.NUI;
+using Tizen.NUI.Test;
+
+namespace Tizen.NUI.Tests
+{
+
+    [TestFixture]
+    [Description("Tizen.NUI.GetResourcesProvider Tests")]
+    public class GetResourcesProviderTests
+    {
+        private static string TAG = "NUI";
+
+        [SetUp]
+        public void Init()
+        {
+            Tizen.Log.Info(TAG, "Init() is called!");
+            App.MainTitleChangeText("GetResourcesProviderTests");
+            App.MainTitleChangeBackgroundColor(null);
+        }
+
+        [TearDown]
+        public void Destroy()
+        {
+            Tizen.Log.Info(TAG, "Destroy() is called!");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Create a GetResourcesProvider object. Check whether object is successfully created or not.")]
+        [Property("SPEC", "Tizen.NUI.GetResourcesProvider.GetResourcesProvider C")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "CONSTR")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public void GetResourcesProvider_INIT()
+        {
+            /* TEST CODE */
+            var resourcesProvider = new GetResourcesProvider();
+            Assert.IsNotNull(resourcesProvider, "Can't create success object GetResourcesProvider");
+            Assert.IsInstanceOf<GetResourcesProvider>(resourcesProvider, "Should be an instance of GetResourcesProvider type.");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test Get. Check whether Get returns expected value or not.")]
+        [Property("SPEC", "Tizen.NUI.GetResourcesProvider.Get M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public void Get_GET_VALUE()
+        {
+            /* TEST CODE */
+            Tizen.NUI.Binding.ResourceDictionary dict = Tizen.NUI.GetResourcesProvider.Get().XamlResources;
+            Assert.IsEmpty(dict, "Shoud be empty");
+        }
+    }
+}
index d4b40ffb6dbc072b8bf3f376cc2f8059951991bf..2d22c01460546c813fcece36c0db6dfe4c16aa36 100755 (executable)
@@ -11,9 +11,18 @@ namespace Tizen.NUI.Tests
     public class GradientVisualTests
     {
         private static string TAG = "NUI";
+        private static bool _flagComposingPropertyMap;
+        internal class MyGradientVisual : GradientVisual
+        {
+            protected override void ComposingPropertyMap()
+            {
+                _flagComposingPropertyMap = true;
+                base.ComposingPropertyMap();
+            }
+        }
 
         [SetUp]
-        public static void Init()
+        public void Init()
         {
             Tizen.Log.Info(TAG, "Init() is called!");
             App.MainTitleChangeText("GradientVisualTests");
@@ -21,7 +30,7 @@ namespace Tizen.NUI.Tests
         }
 
         [TearDown]
-        public static void Destroy()
+        public void Destroy()
         {
             Tizen.Log.Info(TAG, "Destroy() is called!");
         }
@@ -190,5 +199,31 @@ namespace Tizen.NUI.Tests
             gradientVisualMap.SpreadMethod = GradientVisualSpreadMethodType.Pad;
             Assert.AreEqual(GradientVisualSpreadMethodType.Pad, gradientVisualMap.SpreadMethod, "Retrieved SpreadMethod should be equal to set value");
         }
+
+        [Test]
+        [Category("P1")]
+        [Description("Check override method ComposingPropertyMap is invoked when new GradientVisual instance.")]
+        [Property("SPEC", "Tizen.NUI.GradientVisual.ComposingPropertyMap M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
+        public void ComposingPropertyMap_OVERRIDE_METHOD()
+        {
+            /*PRE CONDITION
+             * _flagComposingPropertyMap flag is initialize false value
+             * Create a instance MyGradientVisual
+             */
+            _flagComposingPropertyMap = false;
+            Assert.False(_flagComposingPropertyMap, "_flagComposingPropertyMap should false initial");
+            /**TEST CODE**/
+            var myGradientVisual = new MyGradientVisual()
+            {
+                Center = new Vector2(1.0f, 1.0f),
+                Radius = 2.0f,
+            };
+            Assert.IsInstanceOf<GradientVisual>(myGradientVisual, "Should be an instance of GradientVisual type.");
+            PropertyMap propertyMap = myGradientVisual.OutputVisualMap;
+            Assert.True(_flagComposingPropertyMap, "ComposingPropertyMap overrided method not invoked.");
+        }
     }
 }
index a132053f0d2d454ead6d8665d95ad9ec35bc01f3..f589c1e9e2b93056cb2beb4b3d02c1fc885b54bb 100755 (executable)
@@ -131,6 +131,20 @@ namespace Tizen.NUI.Tests
             Assert.AreEqual(0.0f, hover.GetScreenPosition(0).Y, "Should be equals to the origin value of ScreenPosition.Y");
         }
 
+        [Test]
+        [Category("P1")]
+        [Description("Test Time property. Check whether Time returns the value expected.")]
+        [Property("SPEC", "Tizen.NUI.Hover.Time A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
+        public void Time_Property_GET()
+        {
+            /* TEST CODE */
+            Hover hover = new Hover();
+            Assert.AreEqual(0u, hover.Time, "Should be equals to the origin value of Time");
+        }
+
         [Test]
         [Category("P1")]
         [Description("Test Dispose, try to dispose the Hover.")]
index 9520a8ce9449a9e6aabc9fc8c791ac3f94b2cac7..39780ace852a3a25665089bcbb7d34ce5b127a63 100755 (executable)
@@ -12,9 +12,18 @@ namespace Tizen.NUI.Tests
     {
         private static string TAG = "NUI";
         private static string image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "Tizen.NUI.Tests.png";
+        private static bool _flagComposingPropertyMap;
+        internal class MyImageVisual : ImageVisual
+        {
+            protected override void ComposingPropertyMap()
+            {
+                _flagComposingPropertyMap = true;
+                base.ComposingPropertyMap();
+            }
+        }
 
         [SetUp]
-        public static void Init()
+        public void Init()
         {
             Tizen.Log.Info(TAG, "Init() is called!");
             App.MainTitleChangeText("ImageVisualTests");
@@ -22,7 +31,7 @@ namespace Tizen.NUI.Tests
         }
 
         [TearDown]
-        public static void Destroy()
+        public void Destroy()
         {
             Tizen.Log.Info(TAG, "Destroy() is called!");
         }
@@ -333,5 +342,30 @@ namespace Tizen.NUI.Tests
             map.Atlasing = false;
             Assert.AreEqual(false, map.Atlasing, "Retrieved Atlasing should be equal to set value");
         }
+
+        [Test]
+        [Category("P1")]
+        [Description("Check override method ComposingPropertyMap is invoked when new ImageVisual instance.")]
+        [Property("SPEC", "Tizen.NUI.ImageVisual.ComposingPropertyMap M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
+        public void ComposingPropertyMap_OVERRIDE_METHOD()
+        {
+            /*PRE CONDITION
+             * _flagComposingPropertyMap flag is initialize false value
+             * Create a instance MyImageVisual
+             */
+            _flagComposingPropertyMap = false;
+            Assert.False(_flagComposingPropertyMap, "_flagComposingPropertyMap should false initial");
+            /**TEST CODE**/
+            var myImageVisual = new MyImageVisual()
+            {
+                URL = image_path,
+            };
+            Assert.IsInstanceOf<ImageVisual>(myImageVisual, "Should be an instance of ImageVisual type.");
+            PropertyMap propertyMap = myImageVisual.OutputVisualMap;
+            Assert.True(_flagComposingPropertyMap, "ComposingPropertyMap overrided method not invoked.");
+        }
     }
 }
index 1923a370965bc38ec3964a97ab94721454822dc7..b316f97d490570d11a041262f53f27046d7e2feb 100755 (executable)
@@ -16,9 +16,10 @@ namespace Tizen.NUI.Tests
     {
         private static string TAG = "NUI";
         private static string image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "Tizen.NUI.Tests.png";
+        private static bool _flagOnImfActivedEvent, _flagOnImfEventReceivedEvent, _flagOnLanguageChangedEvent, _flagOnResizedEvent, _flagOnStatusChangedEvent;
 
         [SetUp]
-        public static void Init()
+        public void Init()
         {
             Tizen.Log.Info(TAG, " Init() is called!");
             App.MainTitleChangeText("ImfManagerTests");
@@ -26,11 +27,38 @@ namespace Tizen.NUI.Tests
         }
 
         [TearDown]
-        public static void Destroy()
+        public void Destroy()
         {
             Tizen.Log.Info(TAG, " Destroy() is called!");
         }
 
+        private void OnImfActivedEvent(object sender, EventArgs e)\r
+        {\r
+            _flagOnImfActivedEvent = true;\r
+        }\r
+\r
+        private ImfManager.ImfCallbackData OnImfEventReceivedEvent(object obj, EventArgs e)\r
+        {\r
+            _flagOnImfEventReceivedEvent = true;\r
+            ImfManager.ImfCallbackData callbackData = new ImfManager.ImfCallbackData(true, 0, "", false);\r
+            return callbackData;\r
+        }\r
+\r
+        private void OnLanguageChangedEvent(object obj, EventArgs e)\r
+        {\r
+            _flagOnLanguageChangedEvent = true;\r
+        }\r
+\r
+        private void OnResizedEvent(object obj, EventArgs e)\r
+        {\r
+            _flagOnResizedEvent = true;\r
+        }\r
+\r
+        private void OnStatusChangedEvent(object obj, EventArgs e)\r
+        {\r
+            _flagOnStatusChangedEvent = true;\r
+        }
+
         [Test]
         [Category("P1")]
         [Description("Test constructor. Check whether it works or not.")]
@@ -291,7 +319,7 @@ namespace Tizen.NUI.Tests
         public void GetTextDirection_RETURN_VALUE()
         {
             ImfManager manager = ImfManager.Get();
-            if(manager)
+            if (manager)
             {
                 Assert.AreEqual(ImfManager.TextDirection.LeftToRight, manager.GetTextDirection(), "Should be equal");
             }
@@ -307,7 +335,7 @@ namespace Tizen.NUI.Tests
         public void GetInputPanelLocale_RETURN_VALUE()
         {
             ImfManager manager = ImfManager.Get();
-            if(manager)
+            if (manager)
             {
                 Assert.AreEqual("", manager.GetInputPanelLocale(), "Should be null");
             }
@@ -514,5 +542,187 @@ namespace Tizen.NUI.Tests
                 Assert.Fail("Caught Exception" + e.ToString());
             }
         }
+
+        [Test]
+        [Category("P1")]
+        [Description("Check whether Activated event is triggered.")]
+        [Property("SPEC", "Tizen.NUI.ImfManager.Activated E")]
+        [Property("SPEC_URL", " - ")]
+        [Property("CRITERIA", "EVL")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public async Task Activated_CHECK_EVENT()
+        {
+            /* TEST CODE */
+            var manager = ImfManager.Get();\r
+            Assert.IsInstanceOf<ImfManager>(manager, "Should be an instance of ImfManager type.");
+            try
+            {\r
+                _flagOnImfActivedEvent = false;\r
+                Assert.False(_flagOnImfActivedEvent, "_flagOnImfActivedEvent should false initial");\r
+                manager.Activated += OnImfActivedEvent;\r
+                manager.Activate();
+                await Task.Delay(20);\r
+                Assert.True(_flagOnImfActivedEvent, "Should be true after triger Activated event.");\r
+            }
+            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
+            {\r
+                manager.Activated -= OnImfActivedEvent;\r
+            }
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Check whether EventReceived event is triggered.")]
+        [Property("SPEC", "Tizen.NUI.ImfManager.EventReceived E")]
+        [Property("SPEC_URL", " - ")]
+        [Property("CRITERIA", "EVL")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public async Task EventReceived_CHECK_EVENT()
+        {
+            /* TEST CODE */
+            var manager = ImfManager.Get();\r
+            Assert.IsInstanceOf<ImfManager>(manager, "Should be an instance of ImfManager type.");
+            try
+            {
+                _flagOnImfEventReceivedEvent = false;
+                Assert.False(_flagOnImfEventReceivedEvent, "_flagOnImfEventReceivedEvent should false initial");
+                manager.EventReceived += OnImfEventReceivedEvent;\r
+                manager.Deactivate();
+                manager.HideInputPanel();
+                await Task.Delay(20);
+                manager.Activate();
+                manager.ShowInputPanel();
+                await Task.Delay(20);
+                Assert.True(_flagOnImfEventReceivedEvent, "Should be true after triger EventReceived event.");\r
+            }
+            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
+            {\r
+                manager.EventReceived -= OnImfEventReceivedEvent;\r
+            }
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Check whether LanguageChanged event is triggered.")]
+        [Property("SPEC", "Tizen.NUI.ImfManager.LanguageChanged E")]
+        [Property("SPEC_URL", " - ")]
+        [Property("CRITERIA", "EVL")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public async Task LanguageChanged_CHECK_EVENT()
+        {
+            /* TEST CODE */
+            var manager = ImfManager.Get();\r
+            Assert.IsInstanceOf<ImfManager>(manager, "Should be an instance of ImfManager type.");
+            try
+            {
+                _flagOnLanguageChangedEvent = false;
+                Assert.False(_flagOnLanguageChangedEvent, "_flagOnLanguageChangedEvent should false initial");
+                manager.LanguageChanged += OnLanguageChangedEvent;\r
+                manager.Deactivate();
+                manager.HideInputPanel();
+                await Task.Delay(20);
+                manager.Activate();
+                manager.ShowInputPanel();
+                await Task.Delay(20);
+                Assert.True(_flagOnLanguageChangedEvent, "Should be true after triger LanguageChanged event.");
+            }
+            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
+            {\r
+                manager.LanguageChanged -= OnLanguageChangedEvent;\r
+            }
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Check whether Resized event is triggered.")]
+        [Property("SPEC", "Tizen.NUI.ImfManager.Resized E")]
+        [Property("SPEC_URL", " - ")]
+        [Property("CRITERIA", "EVL")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public async Task Resized_CHECK_EVENT()
+        {
+            /* TEST CODE */
+            var manager = ImfManager.Get();\r
+            Assert.IsInstanceOf<ImfManager>(manager, "Should be an instance of ImfManager type.");
+            try
+            {
+                _flagOnResizedEvent = false;
+                Assert.False(_flagOnResizedEvent, "_flagOnResizedEvent should false initial");
+                manager.Resized += OnResizedEvent;\r
+                manager.Activate();
+                manager.ShowInputPanel();
+                await Task.Delay(60);
+                manager.Deactivate();
+                manager.HideInputPanel();
+                await Task.Delay(60);
+
+                Assert.True(_flagOnResizedEvent, "Should be true after triger Resized event.");
+            }
+            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
+            {\r
+                manager.Resized -= OnResizedEvent;\r
+            }
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Check whether Resized event is triggered.")]
+        [Property("SPEC", "Tizen.NUI.ImfManager.StatusChanged E")]
+        [Property("SPEC_URL", " - ")]
+        [Property("CRITERIA", "EVL")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public async Task StatusChanged_CHECK_EVENT()
+        {
+            /* TEST CODE */
+            var manager = ImfManager.Get();\r
+            Assert.IsInstanceOf<ImfManager>(manager, "Should be an instance of ImfManager type.");
+            try
+            {
+                _flagOnStatusChangedEvent = false;
+                Assert.False(_flagOnStatusChangedEvent, "_flagOnStatusChangedEvent should false initial");
+                manager.StatusChanged += OnStatusChangedEvent;\r
+                manager.Activate();
+                manager.ShowInputPanel();
+                await Task.Delay(70);
+                manager.Deactivate();
+                manager.HideInputPanel();
+                await Task.Delay(70);
+                Assert.True(_flagOnStatusChangedEvent, "Should be true after triger StatusChanged event.");
+            }
+            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
+            {\r
+                manager.StatusChanged -= OnStatusChangedEvent;
+            }
+        }
     }
 }
diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSLongPressGesture.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSLongPressGesture.cs
new file mode 100755 (executable)
index 0000000..087f2a4
--- /dev/null
@@ -0,0 +1,123 @@
+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.LongPressGesture Tests")]
+    public class LongPressGestureTests
+    {
+        private static string TAG = "NUI";
+
+        [SetUp]
+        public void Init()
+        {
+            Tizen.Log.Info(TAG, "Init() is called!");
+            App.MainTitleChangeText("LongPressGestureTests");
+            App.MainTitleChangeBackgroundColor(null);
+        }
+
+        [TearDown]
+        public void Destroy()
+        {
+            Tizen.Log.Info(TAG, "Destroy() is called!");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Create a LongPressGesture object. Check whether LongPressGesture is successfully created or not.")]
+        [Property("SPEC", "Tizen.NUI.LongPressGesture.LongPressGesture C")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "CONSTR")]
+        [Property("COVPARAM", "")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public void LongPressGesture_INIT()
+        {
+            /* TEST CODE */
+            var longPressGesture = new LongPressGesture(Gesture.StateType.Cancelled);
+            Assert.IsNotNull(longPressGesture, "Can't create success object PanGesture");
+            Assert.IsInstanceOf<LongPressGesture>(longPressGesture, "Should be an instance of LongPressGesture type.");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test LocalPoint. Check whether LocalPoint is readable.")]
+        [Property("SPEC", "Tizen.NUI.LongPressGesture.LocalPoint A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public void LocalPoint_GET_VALUE()
+        {
+            /* TEST CODE */
+            try
+            {
+                var longPressGesture = new LongPressGesture(Gesture.StateType.Cancelled);\r
+                Assert.IsInstanceOf<LongPressGesture>(longPressGesture, "Should be an instance of LongPressGesture type");\r
+                Vector2 vector = longPressGesture.LocalPoint;\r
+                Assert.AreEqual(0, vector.X, "Should be the default value");\r
+                Assert.AreEqual(0, vector.Y, "Should be the default value");\r
+            }
+            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 NumberOfTouches. Check whether NumberOfTouches is readable.")]
+        [Property("SPEC", "Tizen.NUI.LongPressGesture.NumberOfTouches A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public void NumberOfTouches_GET_VALUE()
+        {
+            /* TEST CODE */
+            try
+            {
+                var longPressGesture = new LongPressGesture(Gesture.StateType.Cancelled);\r
+                Assert.IsInstanceOf<LongPressGesture>(longPressGesture, "Should be an instance of LongPressGesture type");\r
+                uint number = longPressGesture.NumberOfTouches;\r
+                Assert.AreEqual(1, number, "Should be the default value");\r
+            }
+            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 ScreenPoint. Check whether ScreenPoint is readable.")]
+        [Property("SPEC", "Tizen.NUI.LongPressGesture.ScreenPoint A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public void ScreenPoint_GET_VALUE()
+        {
+            /* TEST CODE */
+            try
+            {
+                var longPressGesture = new LongPressGesture(Gesture.StateType.Cancelled);\r
+                Assert.IsInstanceOf<LongPressGesture>(longPressGesture, "Should be an instance of LongPressGesture type");\r
+                Vector2 vector = longPressGesture.ScreenPoint;\r
+                Assert.AreEqual(0, vector.X, "Should be the default value");\r
+                Assert.AreEqual(0, vector.Y, "Should be the default value");\r
+            }
+            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());
+            }
+        }
+    }
+}
index 3f33174b21c744fdf97c1a04ee1ba6fee59c9417..10393374e1666b8b2caf8ade6d80283108e14410 100755 (executable)
@@ -11,9 +11,18 @@ namespace Tizen.NUI.Tests
     public class MeshVisualTests
     {
         private static string TAG = "NUI";
+        private static bool _flagComposingPropertyMap;
+        internal class MyMeshVisual : MeshVisual
+        {
+            protected override void ComposingPropertyMap()
+            {
+                _flagComposingPropertyMap = true;
+                base.ComposingPropertyMap();
+            }
+        }
 
         [SetUp]
-        public static void Init()
+        public void Init()
         {
             Tizen.Log.Info(TAG, "Init() is called!");
             App.MainTitleChangeText("MeshVisualTests");
@@ -21,7 +30,7 @@ namespace Tizen.NUI.Tests
         }
 
         [TearDown]
-        public static void Destroy()
+        public void Destroy()
         {
             Tizen.Log.Info(TAG, "Destroy() is called!");
         }
@@ -144,5 +153,30 @@ namespace Tizen.NUI.Tests
             Assert.AreEqual(1.0f, meshVisualMap.LightPosition.Y, "Retrieved LightPosition.Y should be equal to set value");
             Assert.AreEqual(1.0f, meshVisualMap.LightPosition.Z, "Retrieved LightPosition.Z should be equal to set value");
         }
+
+        [Test]
+        [Category("P1")]
+        [Description("Check override method ComposingPropertyMap is invoked when new MeshVisual instance.")]
+        [Property("SPEC", "Tizen.NUI.MeshVisual.ComposingPropertyMap M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
+        public void ComposingPropertyMap_OVERRIDE_METHOD()
+        {
+            /*PRE CONDITION
+             * _flagComposingPropertyMap flag is initialize false value
+             * Create a instance MyMeshVisual
+             */
+            _flagComposingPropertyMap = false;
+            Assert.False(_flagComposingPropertyMap, "_flagComposingPropertyMap should false initial");
+            /**TEST CODE**/
+            var myMeshVisual = new MyMeshVisual()
+            {
+                LightPosition = new Vector3(1.0f, 1.0f, 1.0f),
+            };
+            Assert.IsInstanceOf<MeshVisual>(myMeshVisual, "Should be an instance of MeshVisual type.");
+            PropertyMap propertyMap = myMeshVisual.OutputVisualMap;
+            Assert.True(_flagComposingPropertyMap, "ComposingPropertyMap overrided method not invoked.");
+        }
     }
 }
index f6b35c1de3ba3eebd0a2507fcbf204cd24c1126b..e824772b44d61ba830266712e7dc06d12e8ed237 100755 (executable)
@@ -12,9 +12,18 @@ namespace Tizen.NUI.Tests
     {
         private static string TAG = "NUI";
         private static string image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "Tizen.NUI.Tests.png";
+        private static bool _flagComposingPropertyMap;
+        internal class MyNPatchVisual : NPatchVisual
+        {
+            protected override void ComposingPropertyMap()
+            {
+                _flagComposingPropertyMap = true;
+                base.ComposingPropertyMap();
+            }
+        }
 
         [SetUp]
-        public static void Init()
+        public void Init()
         {
             Tizen.Log.Info(TAG, "Init() is called!");
             App.MainTitleChangeText("NPatchVisualTests");
@@ -22,7 +31,7 @@ namespace Tizen.NUI.Tests
         }
 
         [TearDown]
-        public static void Destroy()
+        public void Destroy()
         {
             Tizen.Log.Info(TAG, "Destroy() is called!");
         }
@@ -90,5 +99,31 @@ namespace Tizen.NUI.Tests
             Assert.AreEqual(10, map.Border.Height, "Retrieved BorderOnly should be equal to set value");
 
         }
+
+        [Test]
+        [Category("P1")]
+        [Description("Check override method ComposingPropertyMap is invoked when new NPatchVisual instance.")]
+        [Property("SPEC", "Tizen.NUI.NPatchVisual.ComposingPropertyMap M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
+        public void ComposingPropertyMap_OVERRIDE_METHOD()
+        {
+            /*PRE CONDITION
+             * _flagComposingPropertyMap flag is initialize false value
+             * Create a instance MyNPatchVisual
+             */
+            _flagComposingPropertyMap = false;
+            Assert.False(_flagComposingPropertyMap, "_flagComposingPropertyMap should false initial");
+            /**TEST CODE**/
+            var myNPatchVisual = new MyNPatchVisual()
+            {
+                URL = image_path,
+                BorderOnly = true,
+            };
+            Assert.IsInstanceOf<NPatchVisual>(myNPatchVisual, "Should be an instance of NPatchVisual type.");
+            PropertyMap propertyMap = myNPatchVisual.OutputVisualMap;
+            Assert.True(_flagComposingPropertyMap, "ComposingPropertyMap overrided method not invoked.");
+        }
     }
 }
index 780c2543ca90e0ff286232a558562f66b7e3205f..7d572fe03378951a6b4a49dafd9e1064993ec26c 100755 (executable)
@@ -14,7 +14,7 @@ namespace Tizen.NUI.Tests
         private static string TAG = "NUI";
 
         [SetUp]
-        public static void Init()
+        public void Init()
         {
             Tizen.Log.Info(TAG, "Init() is called!");
             App.MainTitleChangeText("PanGestureTests");
@@ -22,7 +22,7 @@ namespace Tizen.NUI.Tests
         }
 
         [TearDown]
-        public static void Destroy()
+        public void Destroy()
         {
             Tizen.Log.Info(TAG, "Destroy() is called!");
         }
@@ -42,5 +42,285 @@ namespace Tizen.NUI.Tests
             Assert.IsNotNull(panGesture, "Can't create success object PanGesture");
             Assert.IsInstanceOf<PanGesture>(panGesture, "Should be an instance of PanGesture type.");
         }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test GetDistance. Check whether GetDistance returns expected value or not.")]
+        [Property("SPEC", "Tizen.NUI.PanGesture.GetDistance M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public void GetDistance_CHECK_RETURN_VALUE()
+        {
+            /* TEST CODE */
+            try
+            {
+                var panGesture = new PanGesture();\r
+                Assert.IsInstanceOf<PanGesture>(panGesture, "Should be an instance of PanGesture type.");\r
+                float distance = panGesture.GetDistance();\r
+                Assert.AreEqual(0, distance, "Should be the default value");\r
+            }
+            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 GetScreenDistance. Check whether GetScreenDistance returns expected value or not.")]
+        [Property("SPEC", "Tizen.NUI.PanGesture.GetScreenDistance M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public void GetScreenDistance_CHECK_RETURN_VALUE()
+        {
+            /* TEST CODE */
+            try
+            {
+                var panGesture = new PanGesture();\r
+                Assert.IsInstanceOf<PanGesture>(panGesture, "Should be an instance of PanGesture type.");\r
+                float distance = panGesture.GetScreenDistance();\r
+                Assert.AreEqual(0, distance, "Should be the default value");\r
+            }
+            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 GetScreenSpeed. Check whether GetScreenSpeed returns expected value or not.")]
+        [Property("SPEC", "Tizen.NUI.PanGesture.GetScreenSpeed M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public void GetScreenSpeed_CHECK_RETURN_VALUE()
+        {
+            /* TEST CODE */
+            try
+            {
+                var panGesture = new PanGesture();\r
+                Assert.IsInstanceOf<PanGesture>(panGesture, "Should be an instance of PanGesture type.");\r
+                float speed = panGesture.GetScreenSpeed();\r
+                Assert.AreEqual(0, speed, "Should be the default value");\r
+            }
+            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 GetSpeed. Check whether GetSpeed returns expected value or not.")]
+        [Property("SPEC", "Tizen.NUI.PanGesture.GetSpeed M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public void GetSpeed_CHECK_RETURN_VALUE()
+        {
+            /* TEST CODE */
+            try
+            {
+                var panGesture = new PanGesture();\r
+                Assert.IsInstanceOf<PanGesture>(panGesture, "Should be an instance of PanGesture type.");\r
+                float speed = panGesture.GetSpeed();\r
+                Assert.AreEqual(0, speed, "Should be the default value");\r
+            }
+            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 Displacement. Check whether Displacement is readable.")]
+        [Property("SPEC", "Tizen.NUI.PanGesture.Displacement A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public void Displacement_GET_VALUE()
+        {
+            /* TEST CODE */
+            try
+            {
+                var panGesture = new PanGesture();\r
+                Assert.IsInstanceOf<PanGesture>(panGesture, "Should be an instance of PanGesture type.");\r
+                Vector2 vector = panGesture.Displacement;\r
+                Assert.AreEqual(0, vector.X, "Should be the default value");\r
+                Assert.AreEqual(0, vector.Y, "Should be the default value");\r
+            }
+            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 NumberOfTouches. Check whether NumberOfTouches is readable.")]
+        [Property("SPEC", "Tizen.NUI.PanGesture.NumberOfTouches A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public void NumberOfTouches_GET_VALUE()
+        {
+            /* TEST CODE */
+            try
+            {
+                var panGesture = new PanGesture();\r
+                Assert.IsInstanceOf<PanGesture>(panGesture, "Should be an instance of PanGesture type.");\r
+                uint number = panGesture.NumberOfTouches;\r
+                Assert.AreEqual(1, number, "Should be the default value");\r
+            }
+            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 Position. Check whether Position is readable.")]
+        [Property("SPEC", "Tizen.NUI.PanGesture.Position A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public void Position_GET_VALUE()
+        {
+            /* TEST CODE */
+            try
+            {
+                var panGesture = new PanGesture();\r
+                Assert.IsInstanceOf<PanGesture>(panGesture, "Should be an instance of PanGesture type.");\r
+                Vector2 vector = panGesture.Position;\r
+                Assert.AreEqual(0, vector.X, "Should be the default value");\r
+                Assert.AreEqual(0, vector.Y, "Should be the default value");\r
+            }
+            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 ScreenDisplacement. Check whether ScreenDisplacement is readable.")]
+        [Property("SPEC", "Tizen.NUI.PanGesture.ScreenDisplacement A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public void ScreenDisplacement_GET_VALUE()
+        {
+            /* TEST CODE */
+            try
+            {
+                var panGesture = new PanGesture();\r
+                Assert.IsInstanceOf<PanGesture>(panGesture, "Should be an instance of PanGesture type.");\r
+                Vector2 vector = panGesture.ScreenDisplacement;\r
+                Assert.AreEqual(0, vector.X, "Should be the default value");\r
+                Assert.AreEqual(0, vector.Y, "Should be the default value");\r
+            }
+            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 ScreenPosition. Check whether ScreenPosition is readable.")]
+        [Property("SPEC", "Tizen.NUI.PanGesture.ScreenPosition A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public void ScreenPosition_GET_VALUE()
+        {
+            /* TEST CODE */
+            try
+            {
+                var panGesture = new PanGesture();\r
+                Assert.IsInstanceOf<PanGesture>(panGesture, "Should be an instance of PanGesture type.");\r
+                Vector2 vector = panGesture.ScreenPosition;\r
+                Assert.AreEqual(0, vector.X, "Should be the default value");\r
+                Assert.AreEqual(0, vector.Y, "Should be the default value");\r
+            }
+            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 ScreenVelocity. Check whether ScreenVelocity is readable.")]
+        [Property("SPEC", "Tizen.NUI.PanGesture.ScreenVelocity A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public void ScreenVelocity_GET_VALUE()
+        {
+            /* TEST CODE */
+            try
+            {
+                var panGesture = new PanGesture();\r
+                Assert.IsInstanceOf<PanGesture>(panGesture, "Should be an instance of PanGesture type.");\r
+                Vector2 vector = panGesture.ScreenVelocity;\r
+                Assert.AreEqual(0, vector.X, "Should be the default value");\r
+                Assert.AreEqual(0, vector.Y, "Should be the default value");\r
+            }
+            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 Velocity. Check whether Velocity is readable.")]
+        [Property("SPEC", "Tizen.NUI.PanGesture.Velocity A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public void Velocity_GET_VALUE()
+        {
+            /* TEST CODE */
+            try
+            {
+                var panGesture = new PanGesture();\r
+                Assert.IsInstanceOf<PanGesture>(panGesture, "Should be an instance of PanGesture type.");\r
+                Vector2 vector = panGesture.Velocity;\r
+                Assert.AreEqual(0, vector.X, "Should be the default value");\r
+                Assert.AreEqual(0, vector.Y, "Should be the default value");\r
+            }
+            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/TSPinchGesture.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPinchGesture.cs
new file mode 100755 (executable)
index 0000000..e687c6b
--- /dev/null
@@ -0,0 +1,30 @@
+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.PinchGesture Tests")]
+    public class PinchGestureTests
+    {
+        private static string TAG = "NUI";
+
+        [SetUp]
+        public void Init()
+        {
+            Tizen.Log.Info(TAG, "Init() is called!");
+            App.MainTitleChangeText("PinchGestureTests");
+            App.MainTitleChangeBackgroundColor(null);
+        }
+
+        [TearDown]
+        public void Destroy()
+        {
+            Tizen.Log.Info(TAG, "Destroy() is called!");
+        }
+    }\r
+}
\ No newline at end of file
index ff74360746a835297f092bda6fd9d627b351d855..5fce4f5bde159f7ccdea65e643c4b9e08fa8ff43 100755 (executable)
@@ -17,7 +17,7 @@ namespace Tizen.NUI.Tests
         private static string image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
 
         [SetUp]
-        public static void Init()
+        public void Init()
         {
             Tizen.Log.Info(TAG, "Init() is called!");
             App.MainTitleChangeText("PopupTests");
@@ -25,10 +25,13 @@ namespace Tizen.NUI.Tests
         }
 
         [TearDown]
-        public static void Destroy()
+        public void Destroy()
         {
             Tizen.Log.Info(TAG, "Destroy() is called!");
-        }
+        }\r
+\r
+        private void OnTouchedOutside(object obj, EventArgs e)\r
+        { }
 
         [Test]
         [Category("P1")]
index 27bb0c9974615f5fe61845254117f96d965c1316..9de9619d17070e8a11722d5dc8fc8bbb0ff78207 100755 (executable)
@@ -159,6 +159,21 @@ namespace Tizen.NUI.Tests
             Assert.AreEqual(9, position.Y, "The Y value of the position is not correct!");
         }
 
+        [Test]
+        [Category("P1")]
+        [Description("Test ConvertFromString, Check whether ConvertFromString returns expected value or not")]
+        [Property("SPEC", "Tizen.NUI.Position2D.ConvertFromString M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Wenfeng Ge, wenfeng.ge@samsung.com")]
+        public void ConvertFromString_CHECK_RETURN_VALUE()
+        {
+            /* TEST CODE */
+            Position2D position1 = new Position2D(2, 3);
+            var position2 = Position2D.ConvertFromString("2,3");
+            Assert.AreEqual(position1, position2, "The value of the position2 is not correct!");
+        }
+
         [Test]
         [Category("P1")]
         [Description("Test operator -.")]
@@ -328,6 +343,23 @@ namespace Tizen.NUI.Tests
             Assert.AreEqual(position.Y, vector.Y, "The value of Y is not correct.");
         }
 
+        [Test]
+        [Category("P1")]
+        [Description("Test implicit string, Try to convert a string instance to a position2D instance.")]
+        [Property("SPEC", "Tizen.NUI.Position2D.Implicit M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("COVPARAM", "string")]
+        [Property("AUTHOR", "Wenfeng Ge, wenfeng.ge@samsung.com")]
+        public void Implicit_STRING_RETURN_VALUE()
+        {
+            /* TEST CODE */
+            string position = "10, 20";
+            Position2D position2D = position;
+            Assert.AreEqual(position2D.X, 10, "The value of X is not correct.");
+            Assert.AreEqual(position2D.Y, 20, "The value of Y is not correct.");
+        }
+
         [Test]
         [Category("P1")]
         [Description("Test Dispose, try to dispose the Position2D.")]
index b811da722f5850ed6c210af162e9db47c68af960..f10bfe6f51b03f1e06696534b05f7060b94e6f52 100755 (executable)
@@ -11,9 +11,18 @@ namespace Tizen.NUI.Tests
     public class PrimitiveVisualTests
     {
         private static string TAG = "NUI";
+        private static bool _flagComposingPropertyMap;
+        internal class MyPrimitiveVisual : PrimitiveVisual
+        {
+            protected override void ComposingPropertyMap()
+            {
+                _flagComposingPropertyMap = true;
+                base.ComposingPropertyMap();
+            }
+        }
 
         [SetUp]
-        public static void Init()
+        public void Init()
         {
             Tizen.Log.Info(TAG, "Init() is called!");
             App.MainTitleChangeText("PrimitiveVisualTests");
@@ -21,7 +30,7 @@ namespace Tizen.NUI.Tests
         }
 
         [TearDown]
-        public static void Destroy()
+        public void Destroy()
         {
             Tizen.Log.Info(TAG, "Destroy() is called!");
         }
@@ -227,5 +236,30 @@ namespace Tizen.NUI.Tests
             Assert.AreEqual(1.0f, primitiveVisualMap.LightPosition.Y, "Retrieved LightPosition.Y should be equal to set value");
             Assert.AreEqual(1.0f, primitiveVisualMap.LightPosition.Z, "Retrieved LightPosition.Z should be equal to set value");
         }
+
+        [Test]
+        [Category("P1")]
+        [Description("Check override method ComposingPropertyMap is invoked when new PrimitiveVisual instance.")]
+        [Property("SPEC", "Tizen.NUI.PrimitiveVisual.ComposingPropertyMap M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Wenfeng Ge, wenfeng.ge@samsung.com")]
+        public void ComposingPropertyMap_OVERRIDE_METHOD()
+        {
+            /*PRE CONDITION
+             * _flagComposingPropertyMap flag is initialize false value
+             * Create a instance MySVGVisual
+             */
+            _flagComposingPropertyMap = false;
+            Assert.False(_flagComposingPropertyMap, "_flagComposingPropertyMap should false initial");
+            /**TEST CODE**/
+            var myPrimitiveVisual = new MyPrimitiveVisual()
+            {
+                LightPosition = new Vector3(1.0f, 1.0f, 1.0f),
+            };
+            Assert.IsInstanceOf<PrimitiveVisual>(myPrimitiveVisual, "Should be an instance of PrimitiveVisual type.");
+            PropertyMap propertyMap = myPrimitiveVisual.OutputVisualMap;
+            Assert.True(_flagComposingPropertyMap, "ComposingPropertyMap overrided method not invoked.");
+        }
     }
 }
index 13e313b72d8940e641eb49984c922df589850237..dba564a8b8f68f46814077df8bebc0895a40740e 100755 (executable)
@@ -259,8 +259,9 @@ namespace Tizen.NUI.Tests
         [Property("SPEC", "Tizen.NUI.PropertyArray.Add M")]
         [Property("SPEC_URL", "-")]
         [Property("CRITERIA", "MR")]
+        [Property("COVPARAM", "PropertyValue")]
         [Property("AUTHOR", "Zaijuan Sui, z6177.sui@samsung.com")]
-        public void Add_CHECK_VALUE()
+        public void Add_CHECK_VALUE_WITH_PROPERTYVALUE()
         {
             /* TEST CODE */
             PropertyArray propertyarray = new PropertyArray();
index 902585855eb5c2cd4912f98eff39d39367ae5e14..b7b4ad2512c0cd117ebf36926fcd5231ce1b598c 100755 (executable)
@@ -13,8 +13,18 @@ namespace Tizen.NUI.Tests
         private static string TAG = "NUI";
         private static string image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "Tizen.NUI.Tests.png";
 
+        private static bool _flagComposingPropertyMap;
+        internal class MySVGVisual : SVGVisual
+        {
+            protected override void ComposingPropertyMap()
+            {
+                _flagComposingPropertyMap = true;
+                base.ComposingPropertyMap();
+            }
+        }
+
         [SetUp]
-        public static void Init()
+        public void Init()
         {
             Tizen.Log.Info(TAG, "Init() is called!");
             App.MainTitleChangeText("SVGVisualTests");
@@ -22,7 +32,7 @@ namespace Tizen.NUI.Tests
         }
 
         [TearDown]
-        public static void Destroy()
+        public void Destroy()
         {
             Tizen.Log.Info(TAG, "Destroy() is called!");
         }
@@ -56,5 +66,30 @@ namespace Tizen.NUI.Tests
             map.URL = image_path;
             Assert.AreEqual(image_path, map.URL, "Retrieved URL should be equal to set value");
         }
+
+        [Test]
+        [Category("P1")]
+        [Description("Check override method ComposingPropertyMap is invoked when new SVGVisual instance.")]
+        [Property("SPEC", "Tizen.NUI.SVGVisual.ComposingPropertyMap M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Wenfeng Ge, wenfeng.ge@samsung.com")]
+        public void ComposingPropertyMap_OVERRIDE_METHOD()
+        {
+            /*PRE CONDITION
+             * _flagComposingPropertyMap flag is initialize false value
+             * Create a instance MySVGVisual
+             */
+            _flagComposingPropertyMap = false;
+            Assert.False(_flagComposingPropertyMap, "_flagComposingPropertyMap should false initial");
+            /**TEST CODE**/
+            var mySVGVisual = new MySVGVisual()
+            {
+                URL = image_path,
+            };
+            Assert.IsInstanceOf<SVGVisual>(mySVGVisual, "Should be an instance of SVGVisual type.");
+            PropertyMap propertyMap = mySVGVisual.OutputVisualMap;
+            Assert.True(_flagComposingPropertyMap, "ComposingPropertyMap overrided method not invoked.");
+        }
     }
 }
index e01254ad178b6f5214fc5c92e562872786eef801..f493d7ebf55985913a98385d86fe0362cf80613b 100755 (executable)
@@ -14,7 +14,7 @@ namespace Tizen.NUI.Tests
         private static string TAG = "NUI";
 
         [SetUp]
-        public static void Init()
+        public void Init()
         {
             Tizen.Log.Info(TAG, "Init() is called!");
             App.MainTitleChangeText("ScrollBarTests");
@@ -22,10 +22,10 @@ namespace Tizen.NUI.Tests
         }
 
         [TearDown]
-        public static void Destroy()
+        public void Destroy()
         {
             Tizen.Log.Info(TAG, "Destroy() is called!");
-        }
+        }\r
 
         [Test]
         [Category("P1")]
index 6f570c8265684945afe91a44cb3b454a4257fb5e..04c320c3e921da9ba28160dd992d2a18548f60c8 100755 (executable)
@@ -15,7 +15,7 @@ namespace Tizen.NUI.Tests
         private static string TAG = "NUI";
 
         [SetUp]
-        public static void Init()
+        public void Init()
         {
             Tizen.Log.Info(TAG, "Init() is called!");
             App.MainTitleChangeText("ScrollViewTests");
@@ -23,10 +23,10 @@ namespace Tizen.NUI.Tests
         }
 
         [TearDown]
-        public static void Destroy()
+        public void Destroy()
         {
             Tizen.Log.Info(TAG, "Destroy() is called!");
-        }
+        }\r
 
         [Test]
         [Category("P1")]
@@ -192,11 +192,12 @@ namespace Tizen.NUI.Tests
         public void SetScrollSensitive_CHECK_RETURN_VALUE()
         {
             /* TEST CODE */
-            try {
+            try\r
+            {
                 var scrollView = new ScrollView();
                 scrollView.SetScrollSensitive(true);
             }
-            catch(Exception e)
+            catch (Exception e)
             {
                 Tizen.Log.Error(TAG, "Caught Exception" + e.ToString());
                 LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
@@ -214,11 +215,12 @@ namespace Tizen.NUI.Tests
         public void SetMaxOvershoot_CHECK_RETURN_VALUE()
         {
             /* TEST CODE */
-            try {
+            try\r
+            {
                 var scrollView = new ScrollView();
                 scrollView.SetMaxOvershoot(50.0f, 50.0f);
             }
-            catch(Exception e)
+            catch (Exception e)
             {
                 Tizen.Log.Error(TAG, "Caught Exception" + e.ToString());
                 LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
@@ -236,11 +238,12 @@ namespace Tizen.NUI.Tests
         public void SetSnapOvershootAlphaFunction_CHECK_RETURN_VALUE()
         {
             /* TEST CODE */
-            try {
+            try\r
+            {
                 var scrollView = new ScrollView();
                 scrollView.SetSnapOvershootAlphaFunction(new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseIn));
             }
-            catch(Exception e)
+            catch (Exception e)
             {
                 Tizen.Log.Error(TAG, "Caught Exception" + e.ToString());
                 LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
@@ -263,7 +266,7 @@ namespace Tizen.NUI.Tests
                 var scrollView = new ScrollView();
                 scrollView.SetSnapOvershootDuration(5.0f);
             }
-            catch(Exception e)
+            catch (Exception e)
             {
                 Tizen.Log.Error(TAG, "Caught Exception" + e.ToString());
                 LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
@@ -286,7 +289,7 @@ namespace Tizen.NUI.Tests
                 var scrollView = new ScrollView();
                 scrollView.SetViewAutoSnap(true);
             }
-            catch(Exception e)
+            catch (Exception e)
             {
                 Tizen.Log.Error(TAG, "Caught Exception" + e.ToString());
                 LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
@@ -304,11 +307,12 @@ namespace Tizen.NUI.Tests
         public void SetWrapMode_CHECK_RETURN_VALUE()
         {
             /* TEST CODE */
-            try {
+            try\r
+            {
                 var scrollView = new ScrollView();
                 scrollView.SetWrapMode(true);
             }
-            catch(Exception e)
+            catch (Exception e)
             {
                 Tizen.Log.Error(TAG, "Caught Exception" + e.ToString());
                 LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
@@ -1407,7 +1411,7 @@ namespace Tizen.NUI.Tests
         [Test]
         [Category("P1")]
         [Description("Test Dispose, try to dispose the ScrollBar.")]
-        [Property("SPEC", "Tizen.NUI.UIComponents.ScrollView.Dispose M")]
+        [Property("SPEC", "Tizen.NUI.ScrollView.Dispose M")]
         [Property("SPEC_URL", "-")]
         [Property("CRITERIA", "MR MCST")]
         [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
@@ -1426,7 +1430,6 @@ namespace Tizen.NUI.Tests
                 Assert.Fail("Caught Exception" + e.ToString());
             }
         }
-
     }
 
     public class ScrollViewPagePathEffect : ScrollViewEffect
index a2936adf96898ef9ae44ff7ae4cb43bce64dddbe..d2550662647f24064db4aa8ce1cc3c9cd60d85db 100755 (executable)
@@ -4,6 +4,7 @@ using System;
 using Tizen.NUI;
 using Tizen.NUI.BaseComponents;
 using Tizen.NUI.Test;
+using System.Threading.Tasks;
 
 namespace Tizen.NUI.Tests
 {
@@ -26,8 +27,23 @@ namespace Tizen.NUI.Tests
         public static void Destroy()
         {
             Tizen.Log.Info(TAG, "Destroy() is called!");
+        }\r
+\r
+\r
+        private static bool _flagScrollStarted, _flagScrollCompleted;
+        private void OnScrollStarted(object obj, EventArgs e)\r
+        {\r
+            _flagScrollStarted = true;\r
         }
 
+        private void OnScrollCompleted(object obj, EventArgs e)\r
+        {\r
+            _flagScrollCompleted = true;\r
+        }\r
+\r
+        private void OnScrollUpdated(object obj, EventArgs e)\r
+        { }
+
         [Test]
         [Category("P1")]
         [Description("dali Scrollable constructor test")]
@@ -199,5 +215,80 @@ namespace Tizen.NUI.Tests
             Assert.AreEqual(0, scrollable.ScrollToAlphaFunction, "Should be equal!");
         }
 
+        [Test]
+        [Category("P1")]
+        [Description("Test Scroll ScrollStarted. Check whether the ScrollStarted event triggered when the scroll start")]
+        [Property("SPEC", "Tizen.NUI.BaseComponents.Scrollable.ScrollStarted E")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "EVL")]
+        [Property("AUTHOR", "Junqing Ma, junqing.ma@samsung.com")]
+        public void ScrollStarted_CHECK_EVENT()
+        {
+            /* TEST CODE */
+            var scrollable = new ScrollView();
+            Assert.IsInstanceOf<ScrollView>(scrollable, "Should be a intance of ScrollView type");
+            _flagScrollStarted = false;
+            Assert.False(_flagScrollStarted, "_flagScrollStarted should false initial");
+            scrollable.ScrollStarted += OnScrollStarted;
+
+            scrollable.ScrollDomainSize = new Vector2(1000.0f, 1000.0f);
+            scrollable.ScrollTo(new Vector2(100.0f, 100.0f), 1.0f);
+
+            Assert.IsTrue(_flagScrollStarted, "The ScrollStarted Event is not triggered!");
+            scrollable.ScrollStarted -= OnScrollStarted;
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test Scroll ScrollCompleted. Check whether the ScrollCompleted event triggered when the scroll complete")]
+        [Property("SPEC", "Tizen.NUI.BaseComponents.Scrollable.ScrollCompleted E")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "EVL")]
+        [Property("AUTHOR", "Junqing Ma, junqing.ma@samsung.com")]
+        public async Task ScrollCompleted_CHECK_EVENT()
+        {
+            /* TEST CODE */
+            var scrollable = new ScrollView();
+            Assert.IsInstanceOf<ScrollView>(scrollable, "Should be a intance of ScrollView type");
+            Assert.IsNotNull(scrollable, "Shouldn't be null");
+            _flagScrollCompleted = false;
+            Assert.False(_flagScrollCompleted, "_flagScrollCompleted should false initial");
+            scrollable.ScrollCompleted += OnScrollCompleted;
+
+            scrollable.ScrollDomainSize = new Vector2(1000.0f, 1000.0f);
+            scrollable.ScrollTo(new Vector2(100.0f, 100.0f), 0.05f);
+            await Task.Delay(100);
+
+            Assert.IsTrue(_flagScrollCompleted, "The ScrollCompleted Event is not triggered!");
+            scrollable.ScrollCompleted -= OnScrollCompleted;
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test Scroll ScrollUpdated. Check whether the ScrollUpdated event triggered when the scroll complete")]
+        [Property("SPEC", "Tizen.NUI.BaseComponents.Scrollable.ScrollUpdated E")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "EVL")]
+        [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
+        public void ScrollUpdated_CHECK_EVENT()
+        {
+            /* TEST CODE */
+            var scrollable = new ScrollView();\r
+            Assert.IsInstanceOf<ScrollView>(scrollable, "Should be a intance of ScrollView type");
+            try
+            {
+                scrollable.ScrollUpdated += OnScrollUpdated;\r
+            }
+            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
+            {\r
+                scrollable.ScrollUpdated -= OnScrollUpdated;\r
+            }
+        }
     }
 }
index f7d5b51ad390d0806821a9a7134a030ef98f8618..df435637099e7d7e1a2f7e4fe44694bd4fb3c339 100755 (executable)
@@ -30,7 +30,7 @@ namespace Tizen.NUI.Tests
         }
 
         [SetUp]
-        public static void Init()
+        public void Init()
         {
             Tizen.Log.Info(TAG, "Init() is called!");
             App.MainTitleChangeText("SliderTests");
@@ -38,10 +38,10 @@ namespace Tizen.NUI.Tests
         }
 
         [TearDown]
-        public static void Destroy()
+        public void Destroy()
         {
             Tizen.Log.Info(TAG, "Destroy() is called!");
-        }
+        }\r
 
         public bool OnSlidingFinish(object obj, Slider.SlidingFinishedEventArgs args)
         {
index 46def8850dd476690e078f813e87bdbcd76f8957..260c2ce0081596337ed8eb9512e5438500ae2adb 100755 (executable)
@@ -14,7 +14,7 @@ namespace Tizen.NUI.Tests
         private static string TAG = "NUI";
 
         [SetUp]
-        public static void Init()
+        public void Init()
         {
             Tizen.Log.Info(TAG, "Init() is called!");
             App.MainTitleChangeText("TapGestureTests");
@@ -22,7 +22,7 @@ namespace Tizen.NUI.Tests
         }
 
         [TearDown]
-        public static void Destroy()
+        public void Destroy()
         {
             Tizen.Log.Info(TAG, "Destroy() is called!");
         }
@@ -42,5 +42,107 @@ namespace Tizen.NUI.Tests
             Assert.IsNotNull(tapGesture, "Can't create success object TapGesture");
             Assert.IsInstanceOf<TapGesture>(tapGesture, "Should be an instance of TapGesture type.");
         }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test LocalPoint. Check whether LocalPoint is readable.")]
+        [Property("SPEC", "Tizen.NUI.TapGesture.LocalPoint A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public void LocalPoint_GET_VALUE()
+        {
+            /* TEST CODE */
+            try
+            {
+                var tapGesture = new TapGesture();\r
+                Assert.IsInstanceOf<TapGesture>(tapGesture, "Should be an instance of TapGesture type.");\r
+                Vector2 vector = tapGesture.LocalPoint;\r
+                Assert.AreEqual(0, vector.X, "Should be the default value");\r
+                Assert.AreEqual(0, vector.Y, "Should be the default value");\r
+            }
+            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 NumberOfTaps. Check whether NumberOfTaps is readable.")]
+        [Property("SPEC", "Tizen.NUI.TapGesture.NumberOfTaps A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public void NumberOfTaps_GET_VALUE()
+        {
+            /* TEST CODE */
+            try
+            {
+                var tapGesture = new TapGesture();\r
+                Assert.IsInstanceOf<TapGesture>(tapGesture, "Should be an instance of TapGesture type.");\r
+                uint number = tapGesture.NumberOfTaps;\r
+                Assert.AreEqual(1, number, "Should be the default value");\r
+            }
+            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 NumberOfTouches. Check whether NumberOfTouches is readable.")]
+        [Property("SPEC", "Tizen.NUI.TapGesture.NumberOfTouches A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public void NumberOfTouches_GET_VALUE()
+        {
+            /* TEST CODE */
+            try
+            {
+                var tapGesture = new TapGesture();\r
+                Assert.IsInstanceOf<TapGesture>(tapGesture, "Should be an instance of TapGesture type.");\r
+                uint number = tapGesture.NumberOfTouches;\r
+                Assert.AreEqual(1, number, "Should be the default value");\r
+            }
+            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 ScreenPoint. Check whether ScreenPoint is readable.")]
+        [Property("SPEC", "Tizen.NUI.TapGesture.ScreenPoint A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public void ScreenPoint_GET_VALUE()
+        {
+            /* TEST CODE */
+            try
+            {
+                var tapGesture = new TapGesture();\r
+                Assert.IsInstanceOf<TapGesture>(tapGesture, "Should be an instance of TapGesture type.");\r
+                Vector2 vector = tapGesture.ScreenPoint;\r
+                Assert.AreEqual(0, vector.X, "Should be the default value");\r
+                Assert.AreEqual(0, vector.Y, "Should be the default value");\r
+            }
+            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());
+            }
+        }
     }
 }
index 8a48239c2e10f20bfc62e00d8d05d4b84cbd06f7..ee4867dcd30331a14040feafb4e522ff0f53d031 100755 (executable)
@@ -675,5 +675,41 @@ namespace Tizen.NUI.Tests
         }
 #endif
 
+        [Test]
+        [Category("P1")]
+        [Description("Test OnBindingContextChanged. Check whether it return the right value")]
+        [Property("SPEC", "Tizen.NUI.BaseComponents.TextLabel.OnBindingContextChanged M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("COVPARAM", "")]
+        [Property("AUTHOR", "Junqing Ma, junqing.ma@samsung.com")]
+        public void OnBindingContextChanged_CHECK_RETURN_VALUE()
+        {
+            /* TEST CODE */
+            try
+            {
+                MyTexLabel textLabel = new MyTexLabel();
+                textLabel._OnBindingContextChanged();
+            }
+            catch(Exception e)
+            {
+                Tizen.Log.Error("Test CustomView.cs", "Caught Exception" + e.ToString());
+                LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+                Assert.Fail("Caught Exception" + e.ToString());
+            }
+        }
+
+    }
+
+    public class MyTexLabel : TextLabel
+    {
+        public MyTexLabel() : base()
+        {
+        }
+
+        public void _OnBindingContextChanged()
+        {
+            base.OnBindingContextChanged();
+        }
     }
 }
index d7148ad4a3ede682918f569cdf980e1973368cde..f9462dd964de30964132bc0ccb97c7e9e3265a70 100755 (executable)
@@ -12,8 +12,18 @@ namespace Tizen.NUI.Tests
     {
         private static string TAG = "NUI";
 
+        private static bool _flagComposingPropertyMap;
+        internal class MyTextVisual : TextVisual
+        {
+            protected override void ComposingPropertyMap()
+            {
+                _flagComposingPropertyMap = true;
+                base.ComposingPropertyMap();
+            }
+        }
+
         [SetUp]
-        public static void Init()
+        public void Init()
         {
             Tizen.Log.Info(TAG, "Init() is called!");
             App.MainTitleChangeText("TextVisualTests");
@@ -21,7 +31,7 @@ namespace Tizen.NUI.Tests
         }
 
         [TearDown]
-        public static void Destroy()
+        public void Destroy()
         {
             Tizen.Log.Info(TAG, "Destroy() is called!");
         }
@@ -322,5 +332,30 @@ namespace Tizen.NUI.Tests
             Assert.AreEqual(0.3f, color.B, "Retrieved color.B should be equal to set value");
             Assert.AreEqual(0.5f, color.A, "Retrieved color.A should be equal to set value");
         }
+
+        [Test]
+        [Category("P1")]
+        [Description("Check override method ComposingPropertyMap is invoked when new TextVisual instance.")]
+        [Property("SPEC", "Tizen.NUI.TextVisual.ComposingPropertyMap M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Wenfeng Ge, wenfeng.ge@samsung.com")]
+        public void ComposingPropertyMap_OVERRIDE_METHOD()
+        {
+            /*PRE CONDITION
+             * _flagComposingPropertyMap flag is initialize false value
+             * Create a instance MySVGVisual
+             */
+            _flagComposingPropertyMap = false;
+            Assert.False(_flagComposingPropertyMap, "_flagComposingPropertyMap should false initial");
+            /**TEST CODE**/
+            var myTextVisual = new MyTextVisual()
+            {
+                TextColor = new Color(1.0f, 0.3f, 0.5f, 1.0f),
+            };
+            Assert.IsInstanceOf<TextVisual>(myTextVisual, "Should be an instance of TextVisual type.");
+            PropertyMap propertyMap = myTextVisual.OutputVisualMap;
+            Assert.True(_flagComposingPropertyMap, "ComposingPropertyMap overrided method not invoked.");
+        }
     }
 }
index b87ebfdedf61a71b039f7e3ab9ab2fe17989ac5a..ab9449a7db2e9add98c86a6cc45164477c0403e9 100755 (executable)
@@ -14,7 +14,7 @@ namespace Tizen.NUI.Tests
         private static string TAG = "NUI";
 
         [SetUp]
-        public static void Init()
+        public void Init()
         {
             Tizen.Log.Info(TAG, "Init() is called!");
             App.MainTitleChangeText("TouchTests");
@@ -22,7 +22,7 @@ namespace Tizen.NUI.Tests
         }
 
         [TearDown]
-        public static void Destroy()
+        public void Destroy()
         {
             Tizen.Log.Info(TAG, "Destroy() is called!");
         }
index 98c8098b103540e3c3badad279770985849fc69e..db964adcb1fc079d6048586612301839e9d2b2d0 100755 (executable)
@@ -17,19 +17,15 @@ namespace Tizen.NUI.Tests
     {
         private static string TAG = "NUI";
         private static string video_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "demoVideo.mp4";
+        private static bool _flagOnFinished;
 
-        private bool checkValue;
-        public VideoViewTests()
+        private void OnFinished(object obj, VideoView.FinishedEventArgs args)
         {
-            checkValue = false;
-        }
-        public void OnFinish(object obj, VideoView.FinishedEventArgs args)
-        {
-            checkValue = true;
+            _flagOnFinished = true;
         }
 
         [SetUp]
-        public static void Init()
+        public void Init()
         {
             Tizen.Log.Info(TAG, "Init() is called!");
             App.MainTitleChangeText("VideoViewTests");
@@ -37,10 +33,10 @@ namespace Tizen.NUI.Tests
         }
 
         [TearDown]
-        public static void Destroy()
+        public void Destroy()
         {
             Tizen.Log.Info(TAG, "Destroy() is called!");
-        }
+        }\r
 
         [Test]
         [Category("P1")]
@@ -340,5 +336,39 @@ namespace Tizen.NUI.Tests
                 Assert.Fail("Caught Exception" + e.ToString());
             }
         }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test Finished. Check whether the Finished event triggered when the scroll complete")]
+        [Property("SPEC", "Tizen.NUI.BaseComponents.VideoView.Finished E")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "EVL")]
+        [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
+        public async Task Finished_CHECK_EVENT()
+        {
+            /* TEST CODE */
+            var videoView = new VideoView();\r
+            videoView.ResourceUrl = video_path;\r
+            Assert.IsInstanceOf<VideoView>(videoView, "Should be an instance of VideoView type.");
+            try
+            {
+                _flagOnFinished = false;\r
+                Assert.False(_flagOnFinished, "_flagOnFinished should false initial");
+                videoView.Finished += OnFinished;\r
+                videoView.Play();
+                await Task.Delay(1000);
+                Assert.True(_flagOnFinished, "_flagOnFinished should be true after Finished triggered");
+            }
+            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
+            {\r
+                videoView.Finished -= OnFinished;\r
+            }
+        }
     }
 }
index 315bed373b43a30a9f5ab376c4763cc80321597d..95df9833aaa41b8abdd1dbfa52e82e0d527b0f7c 100755 (executable)
@@ -37,7 +37,7 @@ namespace Tizen.NUI.Tests
                                         " }\n";
 
         [SetUp]
-        public static void Init()
+        public void Init()
         {
             Tizen.Log.Info(TAG, "Init() is called!");
             _flag = false;
@@ -46,7 +46,7 @@ namespace Tizen.NUI.Tests
         }
 
         [TearDown]
-        public static void Destroy()
+        public void Destroy()
         {
             Tizen.Log.Info(TAG, "Destroy() is called!");
         }
@@ -54,7 +54,7 @@ namespace Tizen.NUI.Tests
         private void viewEventCallback(object sender, EventArgs e)
         {
             _flag = true;
-        }
+        }\r
 
         [Test]
         [Category("P1")]
@@ -2517,7 +2517,5 @@ namespace Tizen.NUI.Tests
             Assert.IsTrue(_flag, "Should be true!");
             parentActor.ChildRemoved -= viewEventCallback;
         }
-
     }
-
 }
index 44134daf3cec4cd7d078bfa34ae893da9cca092f..13071e9a261bfadb941cf3b15d5b8f7d7006103b 100755 (executable)
@@ -12,9 +12,17 @@ namespace Tizen.NUI.Tests
     {
         private static string TAG = "NUI";
         private static string image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "Tizen.NUI.Tests.png";
+        private static bool _flagComposingPropertyMap;\r
+        internal class MyVisualAnimator : VisualAnimator\r
+        {\r
+            protected override void ComposingPropertyMap()\r
+            {\r
+                _flagComposingPropertyMap = true;\r
+            }\r
+        }
 
         [SetUp]
-        public static void Init()
+        public void Init()
         {
             Tizen.Log.Info(TAG, "Init() is called!");
             App.MainTitleChangeText("VisualAnimatorTests");
@@ -22,7 +30,7 @@ namespace Tizen.NUI.Tests
         }
 
         [TearDown]
-        public static void Destroy()
+        public void Destroy()
         {
             Tizen.Log.Info(TAG, "Destroy() is called!");
         }
@@ -132,5 +140,31 @@ namespace Tizen.NUI.Tests
             map.DestinationValue = color;
             Assert.IsTrue(color.Equals(map.DestinationValue), "Retrieved DestinationValue should be equal to set value");
         }
+
+        [Test]\r
+        [Category("P1")]\r
+        [Description("Check override method ComposingPropertyMap is invoked when new VisualAnimator instance.")]\r
+        [Property("SPEC", "Tizen.NUI.VisualAnimator.ComposingPropertyMap M")]\r
+        [Property("SPEC_URL", "-")]\r
+        [Property("CRITERIA", "MR")]\r
+        [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]\r
+        public void ComposingPropertyMap_OVERRIDE_METHOD()\r
+        {\r
+            /*PRE CONDITION\r
+             * _flagComposingPropertyMap flag is initialize false value\r
+             * Create a instance VisualAnimator\r
+             */\r
+            _flagComposingPropertyMap = false;\r
+            Assert.False(_flagComposingPropertyMap, "_flagComposingPropertyMap should false initial");\r
+            /**TEST CODE**/\r
+            var myVisualAnimator = new MyVisualAnimator()\r
+            {\r
+                StartTime = 10,\r
+                EndTime = 200,\r
+            };\r
+            Assert.IsInstanceOf<VisualAnimator>(myVisualAnimator, "Should be an instance of VisualAnimator type.");
+            PropertyMap propertyMap = myVisualAnimator.OutputVisualMap;\r
+            Assert.True(_flagComposingPropertyMap, "ComposingPropertyMap overrided method not invoked.");\r
+        }
     }
 }
index 102bbb45ebe9fb7f7f278b91d65255f2dcd0e83a..ac644e1fd443c1b8a607587f9c5e704dd9cd0863 100755 (executable)
@@ -11,9 +11,18 @@ namespace Tizen.NUI.Tests
     public class VisualMapTests
     {
         private static string TAG = "NUI";
+        private static bool _flagComposingPropertyMap;\r
+        internal class MyVisualMap : VisualMap\r
+        {\r
+            protected override void ComposingPropertyMap()\r
+            {\r
+                _flagComposingPropertyMap = true;\r
+                base.ComposingPropertyMap();\r
+            }\r
+        }
 
         [SetUp]
-        public static void Init()
+        public void Init()
         {
             Tizen.Log.Info(TAG, "Init() is called!");
             App.MainTitleChangeText("VisualMapTests");
@@ -21,7 +30,7 @@ namespace Tizen.NUI.Tests
         }
 
         [TearDown]
-        public static void Destroy()
+        public void Destroy()
         {
             Tizen.Log.Info(TAG, "Destroy() is called!");
         }
@@ -388,5 +397,29 @@ namespace Tizen.NUI.Tests
             visualMap.VisualFittingMode = VisualFittingModeType.FitKeepAspectRatio;
             Assert.AreEqual(VisualFittingModeType.FitKeepAspectRatio, visualMap.VisualFittingMode, "Retrieved VisualFittingMode should be equal to set value");
         }
+
+        [Test]\r
+        [Category("P1")]\r
+        [Description("Check override method ComposingPropertyMap is invoked when new VisualMap instance.")]\r
+        [Property("SPEC", "Tizen.NUI.VisualMap.ComposingPropertyMap M")]\r
+        [Property("SPEC_URL", "-")]\r
+        [Property("CRITERIA", "MR")]\r
+        [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]\r
+        public void ComposingPropertyMap_OVERRIDE_METHOD()\r
+        {\r
+            /*PRE CONDITION\r
+             * _flagComposingPropertyMap flag is initialize false value\r
+             * Create a instance VisualMap\r
+             */\r
+            _flagComposingPropertyMap = false;\r
+            Assert.False(_flagComposingPropertyMap, "_flagComposingPropertyMap should false initial");\r
+            /**TEST CODE**/\r
+            var myVisualMap = new MyVisualMap();\r
+            Assert.IsInstanceOf<VisualMap>(myVisualMap, "Should be an instance of VisualMap type.");
+            //In OutputVisualMap will call ComposingPropertyMap to set _flagComposingPropertyMap
+            PropertyMap propertyMap = myVisualMap.OutputVisualMap;\r
+            Assert.AreEqual(0, propertyMap.Count(), "Retrieved PropertyMap count should be 0");\r
+            Assert.True(_flagComposingPropertyMap, "ComposingPropertyMap overrided method not invoked.");\r
+        }
     }
 }
diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSWatchTime.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSWatchTime.cs
new file mode 100755 (executable)
index 0000000..ef1488d
--- /dev/null
@@ -0,0 +1,317 @@
+using NUnit.Framework;\r
+using NUnit.Framework.TUnit;\r
+using System;\r
+using Tizen.NUI;\r
+using System.Threading.Tasks;\r
+using Tizen.NUI.Test;\r
+\r
+namespace Tizen.NUI.Tests\r
+{\r
+\r
+    [TestFixture]\r
+    [Description("Tizen.NUI.WatchTime Tests")]\r
+    public class WatchTimeTests\r
+    {\r
+        private static string TAG = "NUI";\r
+\r
+        private bool IsWearable()\r
+        {\r
+            string value;\r
+            var result = Tizen.System.Information.TryGetValue("tizen.org/feature/profile", out value);\r
+            if (result && value.Equals("wearable"))\r
+            {\r
+                return true;\r
+            }\r
+\r
+            return false;\r
+        }\r
+\r
+        [SetUp]\r
+        public void Init()\r
+        {\r
+            Tizen.Log.Info(TAG, "Init() is called!");\r
+            App.MainTitleChangeText("WatchTimeTests");\r
+            App.MainTitleChangeBackgroundColor(null);\r
+        }\r
+\r
+        [TearDown]\r
+        public void Destroy()\r
+        {\r
+            Tizen.Log.Info(TAG, "Destroy() is called!");\r
+        }\r
+\r
+        [Test]\r
+        [Category("P1")]\r
+        [Description("WatchTime constructor test")]\r
+        [Property("SPEC", "Tizen.NUI.WatchTime.WatchTime C")]\r
+        [Property("SPEC_URL", "-")]\r
+        [Property("CRITERIA", "CONSTR")]\r
+        [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]\r
+        public void WatchTime_INIT()\r
+        {\r
+            if (IsWearable())\r
+            {\r
+                /* TEST CODE */\r
+                var time = new WatchTime();\r
+                Assert.IsInstanceOf<WatchTime>(time, "Should return WatchTime instance.");\r
+            }\r
+            else\r
+            {\r
+                Assert.Pass("Not Supported profile");\r
+            }\r
+        }\r
+\r
+        [Test]\r
+        [Category("P1")]\r
+        [Description("Test Day. Check whether Day is readable.")]\r
+        [Property("SPEC", "Tizen.NUI.WatchTime.Day A")]\r
+        [Property("SPEC_URL", "-")]\r
+        [Property("CRITERIA", "PRO")]\r
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]\r
+        public void Day_GET_VALUE()\r
+        {\r
+            /* TEST CODE */\r
+            if (IsWearable())\r
+            {\r
+                var watchTime = new WatchTime();\r
+                Assert.IsInstanceOf<WatchTime>(watchTime, "Should be an instance of WatchTime type.");\r
+                int time = watchTime.Day;\r
+                Assert.AreEqual(0, time, "Should be the default value");\r
+            }\r
+            else\r
+            {\r
+                Assert.Pass("Not Supported profile");\r
+            }\r
+        }\r
+\r
+        [Test]\r
+        [Category("P1")]\r
+        [Description("Test DaylightSavingTimeStatus. Check whether DaylightSavingTimeStatus is readable.")]\r
+        [Property("SPEC", "Tizen.NUI.WatchTime.DaylightSavingTimeStatus A")]\r
+        [Property("SPEC_URL", "-")]\r
+        [Property("CRITERIA", "PRO")]\r
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]\r
+        public void DaylightSavingTimeStatus_GET_VALUE()\r
+        {\r
+            /* TEST CODE */\r
+            if (IsWearable())\r
+            {\r
+                var watchTime = new WatchTime();\r
+                Assert.IsInstanceOf<WatchTime>(watchTime, "Should be an instance of WatchTime type.");\r
+                bool status = watchTime.DaylightSavingTimeStatus;\r
+                Assert.AreEqual(false, status, "Should be the default value");\r
+            }\r
+            else\r
+            {\r
+                Assert.Pass("Not Supported profile");\r
+            }\r
+        }\r
+\r
+        [Test]\r
+        [Category("P1")]\r
+        [Description("Test DayOfWeek. Check whether DayOfWeek is readable.")]\r
+        [Property("SPEC", "Tizen.NUI.WatchTime.DayOfWeek A")]\r
+        [Property("SPEC_URL", "-")]\r
+        [Property("CRITERIA", "PRO")]\r
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]\r
+        public void DayOfWeek_GET_VALUE()\r
+        {\r
+            /* TEST CODE */\r
+            if (IsWearable())\r
+            {\r
+                var watchTime = new WatchTime();\r
+                Assert.IsInstanceOf<WatchTime>(watchTime, "Should be an instance of WatchTime type.");\r
+                int day = watchTime.DayOfWeek;\r
+                Assert.AreEqual(0, day, "Should be the default value");\r
+            }\r
+            else\r
+            {\r
+                Assert.Pass("Not Supported profile");\r
+            }\r
+        }\r
+\r
+        [Test]\r
+        [Category("P1")]\r
+        [Description("Test Hour. Check whether Hour is readable.")]\r
+        [Property("SPEC", "Tizen.NUI.WatchTime.Hour A")]\r
+        [Property("SPEC_URL", "-")]\r
+        [Property("CRITERIA", "PRO")]\r
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]\r
+        public void Hour_GET_VALUE()\r
+        {\r
+            /* TEST CODE */\r
+            if (IsWearable())\r
+            {\r
+                var watchTime = new WatchTime();\r
+                Assert.IsInstanceOf<WatchTime>(watchTime, "Should be an instance of WatchTime type.");\r
+                int hour = watchTime.Hour;\r
+                Assert.AreEqual(0, hour, "Should be the default value");\r
+            }\r
+            else\r
+            {\r
+                Assert.Pass("Not Supported profile");\r
+            }\r
+        }\r
+\r
+        [Test]\r
+        [Category("P1")]\r
+        [Description("Test Hour24. Check whether Hour24 is readable.")]\r
+        [Property("SPEC", "Tizen.NUI.WatchTime.Hour24 A")]\r
+        [Property("SPEC_URL", "-")]\r
+        [Property("CRITERIA", "PRO")]\r
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]\r
+        public void Hour24_GET_VALUE()\r
+        {\r
+            /* TEST CODE */\r
+            if (IsWearable())\r
+            {\r
+                var watchTime = new WatchTime();\r
+                Assert.IsInstanceOf<WatchTime>(watchTime, "Should be an instance of WatchTime type.");\r
+                int hour24 = watchTime.Hour24;\r
+                Assert.AreEqual(0, hour24, "Should be the default value");\r
+            }\r
+            else\r
+            {\r
+                Assert.Pass("Not Supported profile");\r
+            }\r
+        }\r
+\r
+        [Test]\r
+        [Category("P1")]\r
+        [Description("Test Millisecond. Check whether Millisecond is readable.")]\r
+        [Property("SPEC", "Tizen.NUI.WatchTime.Millisecond A")]\r
+        [Property("SPEC_URL", "-")]\r
+        [Property("CRITERIA", "PRO")]\r
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]\r
+        public void Millisecond_GET_VALUE()\r
+        {\r
+            /* TEST CODE */\r
+            if (IsWearable())\r
+            {\r
+                var watchTime = new WatchTime();\r
+                Assert.IsInstanceOf<WatchTime>(watchTime, "Should be an instance of WatchTime type.");\r
+                int millisecond = watchTime.Millisecond;\r
+                Assert.AreEqual(0, millisecond, "Should be the default value");\r
+            }\r
+            else\r
+            {\r
+                Assert.Pass("Not Supported profile");\r
+            }\r
+        }\r
+\r
+        [Test]\r
+        [Category("P1")]\r
+        [Description("Test Minute. Check whether Minute is readable.")]\r
+        [Property("SPEC", "Tizen.NUI.WatchTime.Minute A")]\r
+        [Property("SPEC_URL", "-")]\r
+        [Property("CRITERIA", "PRO")]\r
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]\r
+        public void Minute_GET_VALUE()\r
+        {\r
+            /* TEST CODE */\r
+            if (IsWearable())\r
+            {\r
+                var watchTime = new WatchTime();\r
+                Assert.IsInstanceOf<WatchTime>(watchTime, "Should be an instance of WatchTime type.");\r
+                int minute = watchTime.Minute;\r
+                Assert.AreEqual(0, minute, "Should be the default value");\r
+            }\r
+            else\r
+            {\r
+                Assert.Pass("Not Supported profile");\r
+            }\r
+        }\r
+\r
+        [Test]\r
+        [Category("P1")]\r
+        [Description("Test Month. Check whether Month is readable.")]\r
+        [Property("SPEC", "Tizen.NUI.WatchTime.Month A")]\r
+        [Property("SPEC_URL", "-")]\r
+        [Property("CRITERIA", "PRO")]\r
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]\r
+        public void Month_GET_VALUE()\r
+        {\r
+            /* TEST CODE */\r
+            if (IsWearable())\r
+            {\r
+                var watchTime = new WatchTime();\r
+                Assert.IsInstanceOf<WatchTime>(watchTime, "Should be an instance of WatchTime type.");\r
+                int month = watchTime.Month;\r
+                Assert.AreEqual(0, month, "Should be the default value");\r
+            }\r
+            else\r
+            {\r
+                Assert.Pass("Not Supported profile");\r
+            }\r
+        }\r
+\r
+        [Test]\r
+        [Category("P1")]\r
+        [Description("Test Second. Check whether Second is readable.")]\r
+        [Property("SPEC", "Tizen.NUI.WatchTime.Second A")]\r
+        [Property("SPEC_URL", "-")]\r
+        [Property("CRITERIA", "PRO")]\r
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]\r
+        public void Second_GET_VALUE()\r
+        {\r
+            /* TEST CODE */\r
+            if (IsWearable())\r
+            {\r
+                var watchTime = new WatchTime();\r
+                Assert.IsInstanceOf<WatchTime>(watchTime, "Should be an instance of WatchTime type.");\r
+                int second = watchTime.Second;\r
+                Assert.AreEqual(0, second, "Should be the default value");\r
+            }\r
+            else\r
+            {\r
+                Assert.Pass("Not Supported profile");\r
+            }\r
+        }\r
+\r
+        [Test]\r
+        [Category("P1")]\r
+        [Description("Test TimeZone. Check whether TimeZone is readable.")]\r
+        [Property("SPEC", "Tizen.NUI.WatchTime.TimeZone A")]\r
+        [Property("SPEC_URL", "-")]\r
+        [Property("CRITERIA", "PRO")]\r
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]\r
+        public void TimeZone_GET_VALUE()\r
+        {\r
+            /* TEST CODE */\r
+            if (IsWearable())\r
+            {\r
+                var watchTime = new WatchTime();\r
+                Assert.IsInstanceOf<WatchTime>(watchTime, "Should be an instance of WatchTime type.");\r
+                string zone = watchTime.TimeZone;\r
+                Assert.AreEqual("", zone, "Should be the default value");\r
+            }\r
+            else\r
+            {\r
+                Assert.Pass("Not Supported profile");\r
+            }\r
+        }\r
+\r
+        [Test]\r
+        [Category("P1")]\r
+        [Description("Test Year. Check whether Year is readable.")]\r
+        [Property("SPEC", "Tizen.NUI.WatchTime.Year A")]\r
+        [Property("SPEC_URL", "-")]\r
+        [Property("CRITERIA", "PRO")]\r
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]\r
+        public void Year_GET_VALUE()\r
+        {\r
+            /* TEST CODE */\r
+            if (IsWearable())\r
+            {\r
+                var watchTime = new WatchTime();\r
+                Assert.IsInstanceOf<WatchTime>(watchTime, "Should be an instance of WatchTime type.");\r
+                int year = watchTime.Year;\r
+                Assert.AreEqual(0, year, "Should be the default value");\r
+            }\r
+            else\r
+            {\r
+                Assert.Pass("Not Supported profile");\r
+            }\r
+        }\r
+    }\r
+}
\ No newline at end of file
index 1d100e7723e7adb776734d872eb86d18dfe23d54..1721de9d7fbdec6b0c6f0358e3bf68ad42a2d97a 100755 (executable)
@@ -10,6 +10,13 @@ namespace Tizen.NUI.Tests
     public class WindowSafeNativeWindowHandleTests
     {
         private static string TAG = "NUI-TCT";
+        internal class MySafeNativeWindowHandle : Window.SafeNativeWindowHandle\r
+        {\r
+            public bool MyReleaseHandle()\r
+            {\r
+                return base.ReleaseHandle();\r
+            }\r
+        }
 
         [SetUp]
         public static void Init()
@@ -51,5 +58,21 @@ namespace Tizen.NUI.Tests
             Window.SafeNativeWindowHandle safeNativeWindowHandle = new Window.SafeNativeWindowHandle();
             Assert.IsFalse(safeNativeWindowHandle.IsInvalid, "safeNativeWindowHandle should be valid here!");
         }
-    }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test ReleaseHandle. Check whether ReleaseHandle returns expected value or not.")]
+        [Property("SPEC", "Tizen.NUI.Window.SafeNativeWindowHandle.ReleaseHandle M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public void ReleaseHandle_CHECK_RETURN_VALUE()
+        {
+            /* TEST CODE */
+            var mySafeHandle = new MySafeNativeWindowHandle();\r
+            Assert.IsInstanceOf<Window.SafeNativeWindowHandle>(mySafeHandle, "Should be an instance of SafeNativeWindowHandle type.");\r
+            bool ret = mySafeHandle.MyReleaseHandle();\r
+            Assert.AreEqual(true, ret, "The return value should be true here.");\r
+        }\r
+    }\r
 }
diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSWindow.WindowFocusChangedEventArgs.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSWindow.WindowFocusChangedEventArgs.cs
new file mode 100755 (executable)
index 0000000..fce7530
--- /dev/null
@@ -0,0 +1,62 @@
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using System;
+using Tizen.NUI;
+using Tizen.NUI.Test;
+
+namespace Tizen.NUI.Tests
+{
+    [TestFixture]
+    [Description("Tizen.NUI.Window.WindowFocusChangedEventArgs Tests")]
+    public class WindowWindowFocusChangedEventArgsTests
+    {
+        private static string TAG = "NUI";
+
+        [SetUp]
+        public void Init()
+        {
+            Tizen.Log.Info(TAG, "Init() is called!");
+            App.MainTitleChangeText("WindowFocusChangedEventArgsTests");
+            App.MainTitleChangeBackgroundColor(null);
+        }
+
+        [TearDown]
+        public void Destroy()
+        {
+            Tizen.Log.Info(TAG, "Destroy() is called!");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Create a WindowFocusChangedEventArgs object. Check whether WindowFocusChangedEventArgs is successfully created or not.")]
+        [Property("SPEC", "Tizen.NUI.Window.WindowFocusChangedEventArgs.WindowFocusChangedEventArgs C")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "CONSTR")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public void WindowFocusChangedEventArgs_INIT()
+        {
+            /* TEST CODE */
+            var focusChangedEventArgs = new Window.WindowFocusChangedEventArgs();
+            Assert.IsNotNull(focusChangedEventArgs, "Can't create success object FocusChangedEventArgs");
+            Assert.IsInstanceOf<Window.WindowFocusChangedEventArgs>(focusChangedEventArgs, "Should be an instance of WindowFocusChangedEventArgs type.");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test Key. Check whether Key is readable and writable.")]
+        [Property("SPEC", "Tizen.NUI.Window.WindowFocusChangedEventArgs.FocusGained A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA","PRW")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public void FocusGained_SET_GET_VALUE()
+        {
+            /* TEST CODE */
+            var focusChangedEventArgs = new Window.WindowFocusChangedEventArgs();
+            focusChangedEventArgs.FocusGained = true;
+            Assert.IsTrue(focusChangedEventArgs.FocusGained, "FocusGained should be equal to set value");
+
+            focusChangedEventArgs.FocusGained = false;
+            Assert.IsFalse(focusChangedEventArgs.FocusGained, "FocusGained should be equal to set value");
+        }
+    }
+}
index 9d2206d53b8f068967fa92101f931b4cb758c279..09e4807ccfc3a9457a146c8bb56145a28d5a2254 100755 (executable)
@@ -17,7 +17,7 @@ namespace Tizen.NUI.Tests
         private static string TAG = "NUI";
 
         [SetUp]
-        public static void Init()
+        public void Init()
         {
             Tizen.Log.Info(TAG, "Init() is called!");
             App.MainTitleChangeText("WindowTests");
@@ -25,10 +25,22 @@ namespace Tizen.NUI.Tests
         }
 
         [TearDown]
-        public static void Destroy()
+        public void Destroy()
         {
             Tizen.Log.Info(TAG, "Destroy() is called!");
-        }
+        }\r
+\r
+        private void OnFocusChanged(object obj, EventArgs e)\r
+        { }
+
+        private void OnKeyEvent(object obj, EventArgs e)\r
+        { }
+
+        private void OnTouchEvent(object obj, EventArgs e)\r
+        { }
+
+        private void OnWheelEvent(object obj, EventArgs e)\r
+        { }
 
         [Test]
         [Category("P1")]
@@ -1099,5 +1111,28 @@ namespace Tizen.NUI.Tests
                 Assert.Fail("Caught Exception" + e.ToString());
             }
         }
-    }
+
+        [Test]
+        [Category("P1")]
+        [Description("FeedKeyEvent test, Check whether FeedKeyEvent function works or not.")]
+        [Property("SPEC", "Tizen.NUI.Window.FeedKeyEvent M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public void FeedKeyEvent_CHECK_RETURN_VALUE()
+        {
+            /* TEST CODE */
+            try
+            {
+                Key keyEvent = new Key();
+                Window.FeedKeyEvent(keyEvent);
+            }
+            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());
+            }
+        }
+    }\r
 }