3 using NUnit.Framework.TUnit;
4 using Tizen.NUI.Components;
5 using Tizen.NUI.BaseComponents;
6 using System.Collections.Generic;
8 namespace Tizen.NUI.Devel.Tests
10 using tlog = Tizen.Log;
13 [Description("public/BaseComponents/ViewEvent")]
14 public class PublicViewEventTest
16 private const string tag = "NUITEST";
18 private bool OnKeyEvent(object source, View.KeyEventArgs e)
23 private bool OnInterceptTouchEvent(object source, View.TouchEventArgs e)
28 private bool OnWheelEvent(object source, View.WheelEventArgs e)
33 private bool OnHoverEvent(object source, View.HoverEventArgs e)
38 private bool OnTouchEvent(object source, View.TouchEventArgs e)
43 private void OnBackgroundResourceLoaded(object sender, View.BackgroundResourceLoadedEventArgs e) { }
48 tlog.Info(tag, "Init() is called!");
54 tlog.Info(tag, "Destroy() is called!");
59 [Description("ViewEvent KeyEvent.")]
60 [Property("SPEC", "Tizen.NUI.ViewEvent.KeyEvent A")]
61 [Property("SPEC_URL", "-")]
62 [Property("CRITERIA", "PRW")]
63 [Property("AUTHOR", "guowei.wang@samsung.com")]
64 public void ViewEventKeyEvent()
66 tlog.Debug(tag, $"ViewEventKeyEvent START");
68 var testingTarget = new View();
69 Assert.IsNotNull(testingTarget, "Can't create success object View");
70 Assert.IsInstanceOf<View>(testingTarget, "Should be an instance of View type.");
72 testingTarget.KeyEvent += OnKeyEvent;
73 testingTarget.KeyEvent -= OnKeyEvent;
75 testingTarget.InterceptTouchEvent += OnInterceptTouchEvent;
76 testingTarget.InterceptTouchEvent -= OnInterceptTouchEvent;
78 testingTarget.TouchEvent += OnTouchEvent;
79 testingTarget.TouchEvent -= OnTouchEvent;
81 testingTarget.HoverEvent += OnHoverEvent;
82 testingTarget.HoverEvent -= OnHoverEvent;
84 testingTarget.WheelEvent += OnWheelEvent;
85 testingTarget.WheelEvent -= OnWheelEvent;
87 testingTarget.BackgroundResourceLoaded += OnBackgroundResourceLoaded;
88 testingTarget.BackgroundResourceLoaded -= OnBackgroundResourceLoaded;
90 tlog.Debug(tag, $"ViewEventKeyEvent END (OK)");