3 using NUnit.Framework.TUnit;
4 using Tizen.NUI.Components;
5 using Tizen.NUI.BaseComponents;
7 namespace Tizen.NUI.Devel.Tests
9 using tlog = Tizen.Log;
12 [Description("public/Window/GLWindowVisibilityChangedEvent")]
13 internal class PublicGLWindowVisibilityChangedEventTest
15 private const string tag = "NUITEST";
17 private delegate bool dummyCallback(IntPtr glWindow);
18 private bool OnDummyCallback(IntPtr data)
26 tlog.Info(tag, "Init() is called!");
32 tlog.Info(tag, "Destroy() is called!");
37 [Description("Create a GLWindowVisibilityChangedEvent object.")]
38 [Property("SPEC", "Tizen.NUI.GLWindowVisibilityChangedEvent.GLWindowVisibilityChangedEvent C")]
39 [Property("SPEC_URL", "-")]
40 [Property("CRITERIA", "CONSTR")]
41 [Property("COVPARAM", "")]
42 public void GLWindowVisibilityChangedEventConstructor()
44 tlog.Debug(tag, $"GLWindowVisibilityChangedEventConstructor START");
45 string name = "myGLWindow";
46 Rectangle rectangle = new Rectangle(20, 20, 100, 100);
47 GLWindow a1 = new GLWindow(name, rectangle, true);
49 GLWindowVisibilityChangedEvent b1 = new GLWindowVisibilityChangedEvent(a1.SwigCPtr.Handle, false);
53 tlog.Debug(tag, $"GLWindowVisibilityChangedEventConstructor END (OK)");
54 Assert.Pass("GLWindowVisibilityChangedEventConstructor");
59 //[Description("GLWindowVisibilityChangedEvent Empty")]
60 //[Property("SPEC", "Tizen.NUI.GLWindowVisibilityChangedEvent.Empty M")]
61 //[Property("SPEC_URL", "-")]
62 //[Property("CRITERIA", "MR")]
63 //public void GLWindowVisibilityChangedEventEmpty()
65 // tlog.Debug(tag, $"GLWindowVisibilityChangedEventEmpty START");
67 // using (GLWindow glWindow = new GLWindow())
69 // var testingTarget = new GLWindowVisibilityChangedEvent(glWindow.SwigCPtr.Handle, false);
73 // var result = testingTarget.Empty();
74 // tlog.Debug(tag, "result : " + result);
76 // catch (Exception e)
78 // tlog.Debug(tag, e.Message.ToString());
79 // Assert.Fail("Caught Exception : Failed!");
82 // testingTarget.Dispose();
85 // tlog.Debug(tag, $"GLWindowVisibilityChangedEventEmpty END (OK)");
90 [Description("GLWindowVisibilityChangedEvent GetConnectionCount")]
91 [Property("SPEC", "Tizen.NUI.GLWindowVisibilityChangedEvent.GetConnectionCount M")]
92 [Property("SPEC_URL", "-")]
93 [Property("CRITERIA", "MR")]
94 public void GLWindowVisibilityChangedEventGetConnectionCount()
96 tlog.Debug(tag, $"GLWindowVisibilityChangedEventGetConnectionCount START");
97 string name = "myGLWindow";
98 Rectangle rectangle = new Rectangle(20, 20, 100, 100);
99 GLWindow a1 = new GLWindow(name, rectangle, true);
101 GLWindowVisibilityChangedEvent b1 = new GLWindowVisibilityChangedEvent(a1.SwigCPtr.Handle, false);
102 b1.GetConnectionCount();
105 tlog.Debug(tag, $"GLWindowVisibilityChangedEventGetConnectionCount END (OK)");
106 Assert.Pass("GLWindowVisibilityChangedEventGetConnectionCount");
111 //[Description("GLWindowVisibilityChangedEvent Connect")]
112 //[Property("SPEC", "Tizen.NUI.GLWindowVisibilityChangedEvent.Connect M")]
113 //[Property("SPEC_URL", "-")]
114 //[Property("CRITERIA", "MR")]
115 //public void GLWindowVisibilityChangedEventConnect()
117 // tlog.Debug(tag, $"GLWindowVisibilityChangedEventConnect START");
119 // using (GLWindow glWindow = new GLWindow())
121 // var testingTarget = new GLWindowVisibilityChangedEvent(glWindow.SwigCPtr.Handle, false);
125 // dummyCallback callback = OnDummyCallback;
126 // testingTarget.Connect(callback);
127 // testingTarget.Disconnect(callback);
129 // catch (Exception e)
131 // tlog.Debug(tag, e.Message.ToString());
132 // Assert.Fail("Caught Exception : Failed!");
135 // testingTarget.Dispose();
138 // tlog.Debug(tag, $"GLWindowVisibilityChangedEventConnect END (OK)");
139 // Assert.Pass("GLWindowVisibilityChangedEventConnect");
144 [Description("GLWindowVisibilityChangedEvent Emit")]
145 [Property("SPEC", "Tizen.NUI.GLWindowVisibilityChangedEvent.Emit M")]
146 [Property("SPEC_URL", "-")]
147 [Property("CRITERIA", "MR")]
148 public void GLWindowVisibilityChangedEventEmit()
150 tlog.Debug(tag, $"GLWindowVisibilityChangedEventEmit START");
151 string name = "myGLWindow";
152 Rectangle rectangle = new Rectangle(20, 20, 100, 100);
153 GLWindow a1 = new GLWindow(name, rectangle, true);
155 GLWindowVisibilityChangedEvent b1 = new GLWindowVisibilityChangedEvent(a1.SwigCPtr.Handle, false);
159 tlog.Debug(tag, $"GLWindowVisibilityChangedEventEmit END (OK)");
160 Assert.Pass("GLWindowVisibilityChangedEventEmit");