From: Xianbing Teng Date: Wed, 26 Feb 2020 06:11:19 +0000 (+0800) Subject: [NUI.Components][ACR-307] Add public style apis testcases X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8a8aef95a84550d182537c97d371e60ab3455fd6;p=test%2Ftct%2Fcsharp%2Fapi.git [NUI.Components][ACR-307] Add public style apis testcases Change-Id: Ic5f59d7cd1b5640dcf3bbf2d8391668d62cbd8df --- 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 a6e88eb97..973999ccc 100644 --- a/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSButton.cs +++ b/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSButton.cs @@ -7,7 +7,8 @@ using Tizen.NUI.Components; using System.Runtime.InteropServices; using System.Threading.Tasks; using Tizen.NUI.Components.Test; - +using Tizen.NUI.BaseComponents; + namespace Tizen.NUI.Components.Tests { [TestFixture] @@ -23,6 +24,8 @@ namespace Tizen.NUI.Components.Tests private static bool _themeFlag = false; private static bool _measureTextFlag = false; private static bool _layoutChildFlag = false; + private static bool _flagGetViewStyle = false; + private static bool _flagOnThemeChangedEvent = false; [SetUp] public void Init() @@ -53,8 +56,64 @@ namespace Tizen.NUI.Components.Tests /* TEST CODE */ var button = new Components.Button(); Assert.IsNotNull(button, "Should be not null"); - Assert.IsInstanceOf(button, "Should be equal!"); + Assert.IsInstanceOf(button, "Should be an instance of Button!"); + } + + [Test] + [Category("P1")] + [Description("Test Button constructor using string. Check it has been triggered")] + [Property("SPEC", "Tizen.NUI.Components.Button.Button C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("COVPARAM", "string")] + [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] + public void Button_INIT_WITH_STRING() + { + /* TEST CODE */ + StyleManager.Instance.Theme = "default"; + StyleManager.Instance.RegisterStyle("defaultButton", "default", typeof(DefaultButtonStyle)); + var button = new Button("defaultButton"); + Assert.IsNotNull(button, "Should be not null!"); + Assert.IsInstanceOf