[NUI][ACR-130][Update TCT for NUI.] 77/174177/1
authorFeng Jin <feng16.jin@samsung.com>
Thu, 29 Mar 2018 09:33:56 +0000 (17:33 +0800)
committerFeng Jin <feng16.jin@samsung.com>
Thu, 29 Mar 2018 09:33:56 +0000 (17:33 +0800)
Change-Id: I6c1b14fe930a9960df4501f935e35d8d89d83e3a
Signed-off-by: Feng Jin <feng16.jin@samsung.com>
tct-suite-vs/Tizen.NUI.Tests/testcase/TSAnimatedImageVisual.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSImageView.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextField.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextLabel.cs

index 159669e..bdcb060 100755 (executable)
@@ -114,6 +114,24 @@ namespace Tizen.NUI.Tests
 
         [Test]
         [Category("P1")]
+        [Description("Test LoopCount. Check whether LoopCount is readable and writable.")]
+        [Property("SPEC", "Tizen.NUI.AnimatedImageVisual.LoopCount A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRW")]
+        [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")]
+        public void LoopCount_SET_GET_VALUE()
+        {
+            /* TEST CODE */
+            AnimatedImageVisual map = new AnimatedImageVisual();
+            List<string> list = new List<string>();
+            list.Add(image_path);
+            map.URLS = list;
+            map.LoopCount = 0.1f;
+            Assert.AreEqual(0.1f, map.LoopCount, "Retrieved LoopCount should be equal to set value");
+        }
+
+        [Test]
+        [Category("P1")]
         [Description("Test URLS. Check whether URLS is readable and writable.")]
         [Property("SPEC", "Tizen.NUI.AnimatedImageVisual.URLS A")]
         [Property("SPEC_URL", "-")]
index 08b2f5a..f1d9171 100755 (executable)
@@ -16,6 +16,7 @@ namespace Tizen.NUI.Tests
     {
         private static string TAG = "NUI";
         private static string image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
+        private static string gif_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "dog-anim.gif";
 
         [SetUp]
         public static void Init()
@@ -212,6 +213,90 @@ namespace Tizen.NUI.Tests
 
         [Test]
         [Category("P1")]
+        [Description("Test Reload. Check whether the Reload works for gif.")]
+        [Property("SPEC", "Tizen.NUI.BaseComponents.ImageView.Reload M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")]
+        public void Reload_CHECK_RETURN_VALUE()
+        {
+            /* TEST CODE */
+            try
+            {
+                ImageView imageView = new ImageView(gif_path);
+                imageView.Reload();
+            }
+            catch (Exception e)
+            {
+                Assert.Fail("Caught Exception" + e.ToString());
+            }
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test Play. Check whether the Play works for gif.")]
+        [Property("SPEC", "Tizen.NUI.BaseComponents.ImageView.Play M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")]
+        public void Play_CHECK_RETURN_VALUE()
+        {
+            /* TEST CODE */
+            try
+            {
+                ImageView imageView = new ImageView(gif_path);
+                imageView.Play();
+            }
+            catch (Exception e)
+            {
+                Assert.Fail("Caught Exception" + e.ToString());
+            }
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test Pause. Check whether the Pause works for gif.")]
+        [Property("SPEC", "Tizen.NUI.BaseComponents.ImageView.Pause M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")]
+        public void Pause_CHECK_RETURN_VALUE()
+        {
+            /* TEST CODE */
+            try
+            {
+                ImageView imageView = new ImageView(gif_path);
+                imageView.Pause();
+            }
+            catch (Exception e)
+            {
+                Assert.Fail("Caught Exception" + e.ToString());
+            }
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test Stop. Check whether the Stop works for gif.")]
+        [Property("SPEC", "Tizen.NUI.BaseComponents.ImageView.Stop M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")]
+        public void Stop_CHECK_RETURN_VALUE()
+        {
+            /* TEST CODE */
+            try
+            {
+                ImageView imageView = new ImageView(gif_path);
+                imageView.Stop();
+            }
+            catch (Exception e)
+            {
+                Assert.Fail("Caught Exception" + e.ToString());
+            }
+        }
+
+        [Test]
+        [Category("P1")]
         [Description("Test IsResourceReady. Test whether the IsResourceReady will return the right value.")]
         [Property("SPEC", "Tizen.NUI.BaseComponents.ImageView.IsResourceReady M")]
         [Property("SPEC_URL", "-")]
index 823004a..cc9b8e9 100755 (executable)
@@ -973,6 +973,23 @@ namespace Tizen.NUI.Tests
 
         [Test]
         [Category("P1")]
+        [Description("Test EnableShiftSelection. Check whether EnableShiftSelection is readable and writable.")]
+        [Property("SPEC", "Tizen.NUI.BaseComponents.TextEditor.EnableShiftSelection A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRW")]
+        [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")]
+        public void EnableShiftSelection_SET_GET_VALUE()
+        {
+            /* TEST CODE */
+            TextEditor textEditor = new TextEditor();
+            textEditor.EnableShiftSelection = true;
+            Assert.IsTrue(textEditor.EnableShiftSelection, "The value of textEditor.EnableShiftSelection should be true");
+            textEditor.EnableShiftSelection = false;
+            Assert.IsFalse(textEditor.EnableShiftSelection, "The value of textEditor.EnableShiftSelection should be false");
+        }
+
+        [Test]
+        [Category("P1")]
         [Description("Test TextChanged.Check whether TextChanged defined in the spec is callable.")]
         [Property("SPEC", "Tizen.NUI.BaseComponents.TextEditor.TextChanged E")]
         [Property("SPEC_URL", "-")]
index 0e61f65..7c60710 100755 (executable)
@@ -1085,6 +1085,23 @@ namespace Tizen.NUI.Tests
 
         [Test]
         [Category("P1")]
+        [Description("Test EnableShiftSelection. Check whether EnableShiftSelection is readable and writable.")]
+        [Property("SPEC", "Tizen.NUI.BaseComponents.TextField.EnableShiftSelection A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRW")]
+        [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")]
+        public void EnableShiftSelection_SET_GET_VALUE()
+        {
+            /* TEST CODE */
+            TextField textField = new TextField();
+            textField.EnableShiftSelection = true;
+            Assert.IsTrue(textField.EnableShiftSelection, "The value of textField.EnableShiftSelection should be true");
+            textField.EnableShiftSelection = false;
+            Assert.IsFalse(textField.EnableShiftSelection, "The value of textField.EnableShiftSelection should be false");
+        }
+
+        [Test]
+        [Category("P1")]
         [Description("Test TextChanged.Check whether TextChanged defined in the spec is callable.")]
         [Property("SPEC", "Tizen.NUI.BaseComponents.TextField.TextChanged E")]
         [Property("SPEC_URL", "-")]
index c31b75c..8a48239 100755 (executable)
@@ -199,6 +199,21 @@ namespace Tizen.NUI.Tests
 
         [Test]
         [Category("P1")]
+        [Description("Test VerticalLineAlignment. Check whether VerticalLineAlignment is readable and writable.")]
+        [Property("SPEC", "Tizen.NUI.BaseComponents.TextLabel.VerticalLineAlignment A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRW")]
+        [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")]
+        public void VerticalLineAlignment_SET_GET_VALUE()
+        {
+            /* TEST CODE */
+            TextLabel textLabel = new TextLabel();
+            textLabel.VerticalLineAlignment = VerticalLineAlignment.Center;
+            Assert.AreEqual(VerticalLineAlignment.Center, textLabel.VerticalLineAlignment, "Retrieved VerticalLineAlignment should be equal to set value");
+        }
+
+        [Test]
+        [Category("P1")]
         [Description("Test TextColor. Check whether TextColor is readable and writable.")]
         [Property("SPEC", "Tizen.NUI.BaseComponents.TextLabel.TextColor A")]
         [Property("SPEC_URL", "-")]