From 02e3c7add7ab7bedf46d02fd906c0796e051ad46 Mon Sep 17 00:00:00 2001 From: Dongsug Song Date: Thu, 23 Jul 2020 20:27:27 +0900 Subject: [PATCH] [NUI][Non-ACR][Fix tct fail] Change-Id: I0c2a664b75c2a3802f5b8b86e0a953ae387603de --- .../Properties/Resources.Designer.cs | 63 +++++++++ .../Properties/Resources.resx | 124 ++++++++++++++++++ .../testcase/TSButton.cs | 46 ++++--- 3 files changed, 212 insertions(+), 21 deletions(-) create mode 100755 tct-suite-vs/Tizen.NUI.Components.Tests/Properties/Resources.Designer.cs create mode 100755 tct-suite-vs/Tizen.NUI.Components.Tests/Properties/Resources.resx diff --git a/tct-suite-vs/Tizen.NUI.Components.Tests/Properties/Resources.Designer.cs b/tct-suite-vs/Tizen.NUI.Components.Tests/Properties/Resources.Designer.cs new file mode 100755 index 000000000..4f0fef375 --- /dev/null +++ b/tct-suite-vs/Tizen.NUI.Components.Tests/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Tizen.NUI.Components.Tests.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Tizen.NUI.Components.Tests.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/tct-suite-vs/Tizen.NUI.Components.Tests/Properties/Resources.resx b/tct-suite-vs/Tizen.NUI.Components.Tests/Properties/Resources.resx new file mode 100755 index 000000000..bc1c5de2d --- /dev/null +++ b/tct-suite-vs/Tizen.NUI.Components.Tests/Properties/Resources.resx @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + test + + \ No newline at end of file diff --git a/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSButton.cs b/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSButton.cs index 8c8e50294..326f39e6c 100755 --- a/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSButton.cs +++ b/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSButton.cs @@ -7,6 +7,7 @@ using System.Runtime.InteropServices; using System.Threading.Tasks; using Tizen.NUI.Components.Test; using Tizen.NUI.BaseComponents; +using global::System.Resources; namespace Tizen.NUI.Components.Tests { @@ -83,7 +84,7 @@ namespace Tizen.NUI.Components.Tests Assert.Fail("Should throw the Exception: There is no style of defaultButtonX !"); } catch(InvalidOperationException e) - { + { Assert.Pass("InvalidOperationException: passed!"); } } @@ -341,6 +342,9 @@ namespace Tizen.NUI.Components.Tests public void TranslatableTextSelector_SET_GET_VALUE() { /* TEST CODE */ + ResourceManager testRm = new ResourceManager("Tizen.NUI.Components.Tests.Properties.Resources", typeof(ButtonTests).Assembly); + NUIApplication.MultilingualResourceManager = testRm; + var button = new Components.Button(); Assert.IsNotNull(button, "Should be not null"); Assert.IsInstanceOf(button, "Should be equal!"); @@ -377,7 +381,7 @@ namespace Tizen.NUI.Components.Tests Assert.Fail("Should throw the NullReferenceException!"); } catch (NullReferenceException e) - { + { Assert.Pass("NullReferenceException: passed!"); } } @@ -435,7 +439,7 @@ namespace Tizen.NUI.Components.Tests Assert.Fail("Should throw the NullReferenceException!"); } catch(NullReferenceException e) - { + { Assert.Pass("NullReferenceException: passed!"); } } @@ -486,7 +490,7 @@ namespace Tizen.NUI.Components.Tests Assert.Fail("Should throw the NullReferenceException!"); } catch(NullReferenceException e) - { + { Assert.Pass("NullReferenceException: passed!"); } } @@ -536,7 +540,7 @@ namespace Tizen.NUI.Components.Tests Assert.Fail("Should throw the NullReferenceException!"); } catch(NullReferenceException e) - { + { Assert.Pass("NullReferenceException: passed!"); } } @@ -760,8 +764,8 @@ namespace Tizen.NUI.Components.Tests { Assert.Fail("Caught Exception" + e.ToString()); } - } - + } + [Test] [Category("P1")] [Description("Test Button's icon part. Check whether null or not")] @@ -787,8 +791,8 @@ namespace Tizen.NUI.Components.Tests LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); Assert.Fail("Caught Exception" + e.ToString()); } - } - + } + [Test] [Category("P1")] [Description("Test Button's overlay image part. Check whether null or not")] @@ -814,8 +818,8 @@ namespace Tizen.NUI.Components.Tests LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); Assert.Fail("Caught Exception" + e.ToString()); } - } - + } + [Test] [Category("P1")] [Description("Test Button's text part. Check whether null or not")] @@ -841,8 +845,8 @@ namespace Tizen.NUI.Components.Tests LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); Assert.Fail("Caught Exception" + e.ToString()); } - } - + } + [Test] [Category("P1")] [Description("Test Icon relative orientation in Button. Check whether IconRelativeOrientation is readable and writable.")] @@ -857,14 +861,14 @@ namespace Tizen.NUI.Components.Tests { var button = new Button(); Assert.IsNotNull(button, "Should be not null"); - Assert.IsInstanceOf(button, "Should return Button instance"); - button.IconRelativeOrientation = Button.IconOrientation.Top; - Assert.AreEqual(Button.IconOrientation.Top, button.IconRelativeOrientation, "Should be equals to the set value of IconRelativeOrientation"); - button.IconRelativeOrientation = Button.IconOrientation.Bottom; - Assert.AreEqual(Button.IconOrientation.Bottom, button.IconRelativeOrientation, "Should be equals to the set value of IconRelativeOrientation"); - button.IconRelativeOrientation = Button.IconOrientation.Left; - Assert.AreEqual(Button.IconOrientation.Left, button.IconRelativeOrientation, "Should be equals to the set value of IconRelativeOrientation"); - button.IconRelativeOrientation = Button.IconOrientation.Right; + Assert.IsInstanceOf(button, "Should return Button instance"); + button.IconRelativeOrientation = Button.IconOrientation.Top; + Assert.AreEqual(Button.IconOrientation.Top, button.IconRelativeOrientation, "Should be equals to the set value of IconRelativeOrientation"); + button.IconRelativeOrientation = Button.IconOrientation.Bottom; + Assert.AreEqual(Button.IconOrientation.Bottom, button.IconRelativeOrientation, "Should be equals to the set value of IconRelativeOrientation"); + button.IconRelativeOrientation = Button.IconOrientation.Left; + Assert.AreEqual(Button.IconOrientation.Left, button.IconRelativeOrientation, "Should be equals to the set value of IconRelativeOrientation"); + button.IconRelativeOrientation = Button.IconOrientation.Right; Assert.AreEqual(Button.IconOrientation.Right, button.IconRelativeOrientation, "Should be equals to the set value of IconRelativeOrientation"); button.Dispose(); } -- 2.34.1