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/Application/NUIFrameComponent")]
13 class PublicNUIFrameComponentTest
15 private const string tag = "NUITEST";
17 internal class MyNUIFrameComponent : NUIFrameComponent
19 public MyNUIFrameComponent() : base()
22 public void MyOnCreate()
27 public void MyOnStart(Tizen.Applications.AppControl appControl, bool restarted)
29 base.OnStart(appControl, restarted);
32 public void MyOnResume()
37 public void MyOnPause()
42 public void MyOnStop()
47 public void MyOnDestroy()
56 tlog.Info(tag, "Init() is called!");
62 tlog.Info(tag, "Destroy() is called!");
67 [Description("NUIFrameComponent NUIWindowInfo")]
68 [Property("SPEC", "Tizen.NUI.NUIFrameComponent.NUIWindowInfo A")]
69 [Property("SPEC_URL", "-")]
70 [Property("CRITERIA", "PRW")]
71 [Property("AUTHOR", "guowei.wang@samsung.com")]
72 public void NUIFrameComponentNUIWindowInfo()
74 tlog.Debug(tag, $"NUIFrameComponentNUIWindowInfo START");
76 var testingTarget = new NUIFrameComponent();
77 Assert.IsNotNull(testingTarget, "Should be not null.");
78 Assert.IsInstanceOf<NUIFrameComponent>(testingTarget, "Should be an instance of NUIFrameComponent type.");
80 testingTarget.NUIWindowInfo = new NUIWindowInfo(Window.Instance);
81 tlog.Debug(tag, "testingTarget.NUIWindowInfo : " + testingTarget.NUIWindowInfo);
82 Assert.IsNotNull(testingTarget.NUIWindowInfo);
84 tlog.Debug(tag, $"NUIFrameComponentNUIWindowInfo END (OK)");
89 [Description("NUIFrameComponent Window")]
90 [Property("SPEC", "Tizen.NUI.NUIFrameComponent.Window A")]
91 [Property("SPEC_URL", "-")]
92 [Property("CRITERIA", "PRW")]
93 [Property("AUTHOR", "guowei.wang@samsung.com")]
94 public void NUIFrameComponentWindow()
96 tlog.Debug(tag, $"NUIFrameComponentWindow START");
98 var testingTarget = new NUIFrameComponent();
99 Assert.IsNotNull(testingTarget, "Should be not null.");
100 Assert.IsInstanceOf<NUIFrameComponent>(testingTarget, "Should be an instance of NUIFrameComponent type.");
102 testingTarget.Window = new Window(new Rectangle(0, 0, 1920, 1080), false);
103 tlog.Debug(tag, "testingTarget.Window : " + testingTarget.Window);
104 Assert.IsNotNull(testingTarget.Window);
106 tlog.Debug(tag, $"NUIFrameComponentWindow END (OK)");
111 [Description("NUIFrameComponent CreateWindowInfo")]
112 [Property("SPEC", "Tizen.NUI.NUIFrameComponent.CreateWindowInfo M")]
113 [Property("SPEC_URL", "-")]
114 [Property("CRITERIA", "MR")]
115 [Property("AUTHOR", "guowei.wang@samsung.com")]
116 public void NUIFrameComponentCreateWindowInfo()
118 tlog.Debug(tag, $"NUIFrameComponentCreateWindowInfo START");
120 var testingTarget = new NUIFrameComponent();
121 Assert.IsNotNull(testingTarget, "Should be not null.");
122 Assert.IsInstanceOf<NUIFrameComponent>(testingTarget, "Should be an instance of NUIFrameComponent type.");
126 testingTarget.NUIWindowInfo = new NUIWindowInfo(Window.Instance);
127 testingTarget.Window = new Window(new Rectangle(0, 0, 1920, 1080), false);
129 testingTarget.CreateWindowInfo();
133 tlog.Debug(tag, e.Message.ToString());
134 Assert.Fail("Caught Exception: Failed!");
137 tlog.Debug(tag, $"NUIFrameComponentCreateWindowInfo END (OK)");
142 [Description("NUIFrameComponent OnCreate.")]
143 [Property("SPEC", "Tizen.NUI.NUIFrameComponent.OnCreate M")]
144 [Property("SPEC_URL", "-")]
145 [Property("CRITERIA", "MR")]
146 [Property("AUTHOR", "guowei.wang@samsung.com")]
147 public void NUIFrameComponentOnCreate()
149 tlog.Debug(tag, $"NUIFrameComponentOnCreate START");
151 var testingTarget = new MyNUIFrameComponent();
152 Assert.IsNotNull(testingTarget, "Should be not null.");
153 Assert.IsInstanceOf<NUIFrameComponent>(testingTarget, "Should be an instance of NUIFrameComponent type.");
157 testingTarget.MyOnCreate();
161 tlog.Debug(tag, e.Message.ToString());
162 Assert.Fail("Caught Exception: Failed!");
165 tlog.Debug(tag, $"NUIFrameComponentOnCreate END (OK)");
170 [Description("NUIFrameComponent OnStart.")]
171 [Property("SPEC", "Tizen.NUI.NUIFrameComponent.OnStart M")]
172 [Property("SPEC_URL", "-")]
173 [Property("CRITERIA", "MR")]
174 [Property("AUTHOR", "guowei.wang@samsung.com")]
175 public void NUIFrameComponentOnStart()
177 tlog.Debug(tag, $"NUIFrameComponentOnStart START");
179 var testingTarget = new MyNUIFrameComponent();
180 Assert.IsNotNull(testingTarget, "Should be not null.");
181 Assert.IsInstanceOf<NUIFrameComponent>(testingTarget, "Should be an instance of NUIFrameComponent type.");
185 Tizen.Applications.AppControl appControl = new Tizen.Applications.AppControl(true);
186 testingTarget.MyOnStart(appControl, false);
190 tlog.Debug(tag, e.Message.ToString());
191 Assert.Fail("Caught Exception: Failed!");
194 tlog.Debug(tag, $"NUIFrameComponentOnStart END (OK)");
199 [Description("NUIFrameComponent OnResume.")]
200 [Property("SPEC", "Tizen.NUI.NUIFrameComponent.OnResume M")]
201 [Property("SPEC_URL", "-")]
202 [Property("CRITERIA", "MR")]
203 [Property("AUTHOR", "guowei.wang@samsung.com")]
204 public void NUIFrameComponentOnResume()
206 tlog.Debug(tag, $"NUIFrameComponentOnResume START");
208 var testingTarget = new MyNUIFrameComponent();
209 Assert.IsNotNull(testingTarget, "Should be not null.");
210 Assert.IsInstanceOf<NUIFrameComponent>(testingTarget, "Should be an instance of NUIFrameComponent type.");
214 testingTarget.MyOnResume();
218 tlog.Debug(tag, e.Message.ToString());
219 Assert.Fail("Caught Exception: Failed!");
222 tlog.Debug(tag, $"NUIFrameComponentOnResume END (OK)");
227 [Description("NUIFrameComponent OnPause.")]
228 [Property("SPEC", "Tizen.NUI.NUIFrameComponent.OnPause M")]
229 [Property("SPEC_URL", "-")]
230 [Property("CRITERIA", "MR")]
231 [Property("AUTHOR", "guowei.wang@samsung.com")]
232 public void NUIFrameComponentOnPause()
234 tlog.Debug(tag, $"NUIFrameComponentOnPause START");
236 var testingTarget = new MyNUIFrameComponent();
237 Assert.IsNotNull(testingTarget, "Should be not null.");
238 Assert.IsInstanceOf<NUIFrameComponent>(testingTarget, "Should be an instance of NUIFrameComponent type.");
242 testingTarget.MyOnPause();
246 tlog.Debug(tag, e.Message.ToString());
247 Assert.Fail("Caught Exception: Failed!");
250 tlog.Debug(tag, $"NUIFrameComponentOnPause END (OK)");
255 [Description("NUIFrameComponent OnStop.")]
256 [Property("SPEC", "Tizen.NUI.NUIFrameComponent.OnStop M")]
257 [Property("SPEC_URL", "-")]
258 [Property("CRITERIA", "MR")]
259 [Property("AUTHOR", "guowei.wang@samsung.com")]
260 public void NUIFrameComponentOnStop()
262 tlog.Debug(tag, $"NUIFrameComponentOnStop START");
264 var testingTarget = new MyNUIFrameComponent();
265 Assert.IsNotNull(testingTarget, "Should be not null.");
266 Assert.IsInstanceOf<NUIFrameComponent>(testingTarget, "Should be an instance of NUIFrameComponent type.");
270 testingTarget.MyOnStop();
274 tlog.Debug(tag, e.Message.ToString());
275 Assert.Fail("Caught Exception: Failed!");
278 tlog.Debug(tag, $"NUIFrameComponentOnStop END (OK)");
283 [Description("NUIFrameComponent OnDestroy.")]
284 [Property("SPEC", "Tizen.NUI.NUIFrameComponent.OnDestroy M")]
285 [Property("SPEC_URL", "-")]
286 [Property("CRITERIA", "MR")]
287 [Property("AUTHOR", "guowei.wang@samsung.com")]
288 public void NUIFrameComponentOnDestroy()
290 tlog.Debug(tag, $"NUIFrameComponentOnDestroy START");
292 var testingTarget = new MyNUIFrameComponent();
293 Assert.IsNotNull(testingTarget, "Should be not null.");
294 Assert.IsInstanceOf<NUIFrameComponent>(testingTarget, "Should be an instance of NUIFrameComponent type.");
298 testingTarget.MyOnDestroy();
302 tlog.Debug(tag, e.Message.ToString());
303 Assert.Fail("Caught Exception: Failed!");
306 tlog.Debug(tag, $"NUIFrameComponentOnDestroy END (OK)");