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("internal/Common/RenderTaskList")]
13 public class InternalRenderTaskListTest
15 private const string tag = "NUITEST";
20 tlog.Info(tag, "Init() is called!");
26 tlog.Info(tag, "Destroy() is called!");
31 [Description("RenderTaskList constructor.")]
32 [Property("SPEC", "Tizen.NUI.RenderTaskList.RenderTaskList C")]
33 [Property("SPEC_URL", "-")]
34 [Property("CRITERIA", "CONSTR")]
35 [Property("AUTHOR", "guowei.wang@samsung.com")]
36 public void RenderTaskListConstructor()
38 tlog.Debug(tag, $"RenderTaskListConstructor START");
40 var testingTarget = new RenderTaskList();
41 Assert.IsInstanceOf<RenderTaskList>(testingTarget, "Should return RenderTaskList instance.");
43 testingTarget.Dispose();
44 tlog.Debug(tag, $"RenderTaskListConstructor END (OK)");
49 [Description("RenderTaskList DownCast.")]
50 [Property("SPEC", "Tizen.NUI.RenderTaskList.DownCast M")]
51 [Property("SPEC_URL", "-")]
52 [Property("CRITERIA", "MR")]
53 [Property("AUTHOR", "guowei.wang@samsung.com")]
54 public void RenderTaskListDownCast()
56 tlog.Debug(tag, $"RenderTaskListDownCast START");
58 using (RenderTask task = new RenderTask())
62 RenderTaskList.DownCast(task);
66 tlog.Debug(tag, e.Message.ToString());
67 Assert.Fail("Caught Exception : Failed!");
71 tlog.Debug(tag, $"RenderTaskListDownCast END (OK)");
76 [Description("RenderTaskList Assign.")]
77 [Property("SPEC", "Tizen.NUI.RenderTaskList.Assign M")]
78 [Property("SPEC_URL", "-")]
79 [Property("CRITERIA", "MR")]
80 [Property("AUTHOR", "guowei.wang@samsung.com")]
81 public void RenderTaskListAssign()
83 tlog.Debug(tag, $"RenderTaskListAssign START");
85 using (Animatable ani = new Animatable())
87 using (RenderTaskList task = new RenderTaskList(ani.SwigCPtr.Handle, false))
89 var testingTarget = task.Assign(task);
90 Assert.IsNotNull(testingTarget, "Can't create success object RenderTaskList.");
91 Assert.IsInstanceOf<RenderTaskList>(testingTarget, "Should return RenderTaskList instance.");
93 tlog.Debug(tag, "GetTaskCount :" + testingTarget.GetTaskCount());
95 testingTarget.Dispose();
99 tlog.Debug(tag, $"RenderTaskListAssign END (OK)");
104 [Description("RenderTaskList CreateTask.")]
105 [Property("SPEC", "Tizen.NUI.RenderTaskList.CreateTask M")]
106 [Property("SPEC_URL", "-")]
107 [Property("CRITERIA", "MR")]
108 [Property("AUTHOR", "guowei.wang@samsung.com")]
109 public void RenderTaskListCreateTask()
111 tlog.Debug(tag, $"RenderTaskListCreateTask START");
113 var testingTarget = Window.Instance.GetRenderTaskList();
114 Assert.IsInstanceOf<RenderTaskList>(testingTarget, "Should return RenderTaskList instance.");
115 tlog.Debug(tag, "TaskCount : " + testingTarget.GetTaskCount());
119 var task = testingTarget.CreateTask();
120 Assert.IsInstanceOf<RenderTask>(testingTarget, "Should return RenderTask instance.");
121 tlog.Debug(tag, "TaskCount : " + testingTarget.GetTaskCount());
123 using (View view = new View() { Size = new Size(Window.Instance.WindowSize.Width, Window.Instance.WindowSize.Height) })
125 task.SetSourceView(view);
128 testingTarget.GetTask(0);
129 testingTarget.RemoveTask(task);
133 tlog.Info(tag, e.Message.ToString());
134 Assert.Fail("Caught Exception : Failed!");
136 testingTarget.Dispose();
137 tlog.Debug(tag, $"RenderTaskListCreateTask END (OK)");