From eea26bc387aac2f08812161e40d048877949150c Mon Sep 17 00:00:00 2001 From: Youngbok Shin Date: Thu, 4 Feb 2021 16:23:03 +0900 Subject: [PATCH] [NUI][TCSACR-403] Add FontSizeScale properties Change-Id: I839360225b5043ea0eeb8fc11bb9118bc941ad5a --- tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs | 16 ++++++++++++++++ tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextField.cs | 17 +++++++++++++++++ tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextLabel.cs | 16 ++++++++++++++++ 3 files changed, 49 insertions(+) diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs index ed7daf9..c3c22f6 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs @@ -1186,5 +1186,21 @@ namespace Tizen.NUI.Tests Assert.AreEqual(true, ret, "should be same"); } + [Test] + [Category("P1")] + [Description("Test FontSizeScale. Check the default FontSizeScale and whether FontSizeScale is readable and writable.")] + [Property("SPEC", "Tizen.NUI.BaseComponents.TextEditor.FontSizeScale A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "Youngbok Shin, youngb.shin@samsung.com")] + public void FontSizeScale_SET_GET_VALUE() + { + /* TEST CODE */ + TextEditor textEditor = new TextEditor(); + Assert.AreEqual(1.0, textEditor.FontSizeScale, "Retrieved the default FontSizeScale should be equal to 1.0"); + float scale = 0.5f; + textEditor.FontSizeScale = scale; + Assert.AreEqual(scale, textEditor.FontSizeScale, "Retrieved FontSizeScale should be equal to set value"); + } } } diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextField.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextField.cs index ee43b19..888d66c 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextField.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextField.cs @@ -1226,5 +1226,22 @@ namespace Tizen.NUI.Tests ret = textField.MatchSystemLanguageDirection; Assert.AreEqual(true, ret, "should be same"); } + + [Test] + [Category("P1")] + [Description("Test FontSizeScale. Check the default FontSizeScale whether FontSizeScale is readable and writable.")] + [Property("SPEC", "Tizen.NUI.BaseComponents.TextField.FontSizeScale A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "Youngbok Shin, youngb.shin@samsung.com")] + public void FontSizeScale_SET_GET_VALUE() + { + /* TEST CODE */ + TextField textField = new TextField(); + Assert.AreEqual(1.0, textField.FontSizeScale, "Retrieved the default FontSizeScale should be equal to 1.0"); + float scale = 0.5f; + textField.FontSizeScale = scale; + Assert.AreEqual(scale, textField.FontSizeScale, "Retrieved FontSizeScale should be equal to set value"); + } } } diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextLabel.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextLabel.cs index 61296f0..50b5039 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextLabel.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextLabel.cs @@ -745,6 +745,22 @@ namespace Tizen.NUI.Tests Assert.AreEqual(true, ret, "should be same"); } + [Test] + [Category("P1")] + [Description("Test FontSizeScale. Check the default FontSizeScale and whether FontSizeScale is readable and writable.")] + [Property("SPEC", "Tizen.NUI.BaseComponents.TextLabel.FontSizeScale A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "Youngbok Shin, youngb.shin@samsung.com")] + public void FontSizeScale_SET_GET_VALUE() + { + /* TEST CODE */ + TextLabel textLabel = new TextLabel(); + Assert.AreEqual(1.0, textLabel.FontSizeScale, "Retrieved the default FontSizeScale should be equal to 1.0"); + float scale = 0.5f; + textLabel.FontSizeScale = scale; + Assert.AreEqual(scale, textLabel.FontSizeScale, "Retrieved FontSizeScale should be equal to set value"); + } } public class MyTexLabel : TextLabel -- 2.7.4