\r
[Test]
[Category("P1")]
+ [Description("Test: Click. Check whether the event will be triggered when user click the button")]
+ [Property("SPEC", "Tizen.NUI.Components.Button.Clicked E")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "EVL")]
+ [Property("AUTHOR", "Ma Junqing, junqing.ma@samsung.com")]
+ [Precondition(1, "If test on TV, prepare mouse and connect to TV.")]
+ [Step(1, "Click run TC")]
+ [Step(2, "Click(Touch) the button.")]
+ [Step(3, "TC will pass after touch or click.")]
+ [Postcondition(1, "NA")]
+ public async Task Clicked_CB()
+ {
+ _button = new Button(new ButtonStyle());
+ CreateMyButton(_button, "Click me!");\r
+ if (_isWearable)
+ {
+ _wearTestPage.ExecuteTC(_view);
+ }
+ else
+ {
+ _testPage.ExecuteTC(_view);
+ }
+ FocusManager.Instance.SetCurrentFocusView(_button);
+ _button.Clicked += OnClicked;
+ await ManualTest.WaitForConfirm();
+ _button.Clicked -= OnClicked;
+ if (_isWearable)
+ {
+ _wearTestPage.ClearTestCase(_view);
+ }
+ else
+ {
+ _testPage.ClearTestCase(_view);
+ }
+ }\r
+\r
+ [Test]
+ [Category("P1")]
[Description("Test: Click. Check whether the event will be triggered when setting focus to the button")]
[Property("SPEC", "Tizen.NUI.Components.Button.OnFocusGained M")]
[Property("SPEC_URL", "-")]
--- /dev/null
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using System;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using System.Runtime.InteropServices;
+using System.Threading.Tasks;
+using Tizen.NUI.Components.Test;
+
+namespace Tizen.NUI.Components.Tests
+{
+ [TestFixture]
+ [Description("Tizen.NUI.Components.ClickedEventArgs Tests")]
+ public class ClickedEventArgsTests
+ {
+ private const string TAG = "Components";
+
+ [SetUp]
+ public void Init()
+ {
+ Tizen.Log.Info(TAG, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ Tizen.Log.Info(TAG, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test ClickedEventArgs empty constructor. Check it has been triggered")]
+ [Property("SPEC", "Tizen.NUI.Components.ClickedEventArgs.ClickedEventArgs C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "Ma Junqing, junqing.ma@samsung.com")]
+ public void ClickedEventArgs_CHECK_VALUE()
+ {
+ /* TEST CODE */
+ var clickEventArgs = new Components.ClickedEventArgs();
+ Assert.IsNotNull(clickEventArgs, "Should be not null!");
+ Assert.IsInstanceOf<Components.ClickedEventArgs>(clickEventArgs, "Should be equal!");
+
+ }
+ }
+}