[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 159669e8062986105d868acd058682ceaafc358b..bdcb060290831d0c7f1d61a71a06932878d0e15e 100755 (executable)
@@ -112,6 +112,24 @@ namespace Tizen.NUI.Tests
             Assert.AreEqual(0.1f, map.FrameDelay, "Retrieved FrameDelay should be equal to set value");
         }
 
+        [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.")]
index 08b2f5aa70be4d507b8273491a211ef8b0f5e484..f1d9171b88cf158bd0baed1e8a5861eb97475f63 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()
@@ -210,6 +211,90 @@ namespace Tizen.NUI.Tests
             Assert.AreEqual(0.8f, imageView.PixelArea.W, "The PixelArea.W property of imageView is not correct here.");
         }
 
+        [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.")]
index 823004a09529ac47e6852548912ed9fd996aa5bc..cc9b8e9a15adefa13525c9235337802b2a893f6e 100755 (executable)
@@ -971,6 +971,23 @@ namespace Tizen.NUI.Tests
             Assert.AreEqual("Setting Placeholder Text", text, "Should be equals to the set value of text");
         }
 
+        [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.")]
index 0e61f659ba696d1400c754b7173811f4c45563c2..7c60710ab4599a8b51e6ae94660551bb54d72dd1 100755 (executable)
@@ -1083,6 +1083,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.")]
index c31b75c8b211b147959c6ac691a10e564e9b1781..8a48239c2e10f20bfc62e00d8d05d4b84cbd06f7 100755 (executable)
@@ -197,6 +197,21 @@ namespace Tizen.NUI.Tests
             Assert.AreEqual(VerticalAlignment.Center, textLabel.VerticalAlignment, "Retrieved VerticalAlignment should be equal to set value");
         }
 
+        [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.")]