From: Feng Jin Date: Thu, 29 Mar 2018 09:33:56 +0000 (+0800) Subject: [NUI][ACR-130][Update TCT for NUI.] X-Git-Tag: public_m1_final~53^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F77%2F174177%2F1;p=test%2Ftct%2Fcsharp%2Fapi.git [NUI][ACR-130][Update TCT for NUI.] Change-Id: I6c1b14fe930a9960df4501f935e35d8d89d83e3a Signed-off-by: Feng Jin --- diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSAnimatedImageVisual.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSAnimatedImageVisual.cs index 159669e80..bdcb06029 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSAnimatedImageVisual.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSAnimatedImageVisual.cs @@ -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 list = new List(); + 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.")] diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSImageView.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSImageView.cs index 08b2f5aa7..f1d9171b8 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSImageView.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSImageView.cs @@ -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.")] diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs index 823004a09..cc9b8e9a1 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs @@ -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.")] diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextField.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextField.cs index 0e61f659b..7c60710ab 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextField.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextField.cs @@ -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.")] diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextLabel.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextLabel.cs index c31b75c8b..8a48239c2 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextLabel.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextLabel.cs @@ -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.")]