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=6a6e24ed28cfd6606b97c0e5a255f04cdb390cc6;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 159669e..bdcb060 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSAnimatedImageVisual.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSAnimatedImageVisual.cs @@ -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 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.")] [Property("SPEC", "Tizen.NUI.AnimatedImageVisual.URLS A")] [Property("SPEC_URL", "-")] diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSImageView.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSImageView.cs index 08b2f5a..f1d9171 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() @@ -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", "-")] diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs index 823004a..cc9b8e9 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs @@ -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", "-")] diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextField.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextField.cs index 0e61f65..7c60710 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextField.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextField.cs @@ -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", "-")] diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextLabel.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextLabel.cs index c31b75c..8a48239 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextLabel.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextLabel.cs @@ -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", "-")]