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/Layouting/LayoutController")]
13 public class InternalLayoutControllerTest
15 private const string tag = "NUITEST";
20 tlog.Info(tag, "Init() is called!");
26 tlog.Info(tag, "Destroy() is called!");
31 [Description("LayoutController GetId.")]
32 [Property("SPEC", "Tizen.NUI.LayoutController.GetId M")]
33 [Property("SPEC_URL", "-")]
34 [Property("CRITERIA", "MR")]
35 [Property("AUTHOR", "guowei.wang@samsung.com")]
36 public void LayoutControllerGetId()
38 tlog.Debug(tag, $"LayoutControllerGetId START");
40 var testingTarget = new LayoutController(Window.Instance);
41 Assert.IsNotNull(testingTarget, "Can't create success object LayoutController");
42 Assert.IsInstanceOf<LayoutController>(testingTarget, "Should be an instance of LayoutController type.");
44 tlog.Debug(tag, testingTarget.GetId().ToString());
46 testingTarget.Dispose();
48 testingTarget.Dispose();
49 tlog.Debug(tag, $"LayoutControllerGetId END (OK)");
54 [Description("LayoutController RequestLayout.")]
55 [Property("SPEC", "Tizen.NUI.LayoutController.RequestLayout M")]
56 [Property("SPEC_URL", "-")]
57 [Property("CRITERIA", "MR")]
58 [Property("AUTHOR", "guowei.wang@samsung.com")]
59 public void LayoutControllerRequestLayout()
61 tlog.Debug(tag, $"LayoutControllerRequestLayout START");
63 var testingTarget = new LayoutController(Window.Instance);
64 Assert.IsNotNull(testingTarget, "Can't create success object LayoutController");
65 Assert.IsInstanceOf<LayoutController>(testingTarget, "Should be an instance of LayoutController type.");
67 using (LayoutItem layoutItem = new LayoutItem())
69 using (View view = new View())
71 view.Name = "parentView";
72 layoutItem.AttachToOwner(view);
76 testingTarget.RequestLayout(layoutItem);
80 tlog.Debug(tag, e.Message.ToString());
81 Assert.Fail("Caught Exception : Failed!");
87 testingTarget.Dispose();
88 tlog.Debug(tag, $"LayoutControllerRequestLayout END (OK)");
93 [Description("LayoutController RequestLayout.")]
94 [Property("SPEC", "Tizen.NUI.LayoutController.RequestLayout M")]
95 [Property("SPEC_URL", "-")]
96 [Property("CRITERIA", "MR")]
97 [Property("AUTHOR", "guowei.wang@samsung.com")]
98 public void LayoutControllerRequestLayoutParentIsNUll()
100 tlog.Debug(tag, $"LayoutControllerRequestLayoutParentIsNUll START");
102 var testingTarget = new LayoutController(Window.Instance);
103 Assert.IsNotNull(testingTarget, "Can't create success object LayoutController");
104 Assert.IsInstanceOf<LayoutController>(testingTarget, "Should be an instance of LayoutController type.");
106 using (LayoutItem layoutItem = new LayoutItem())
110 testingTarget.RequestLayout(layoutItem);
114 tlog.Debug(tag, e.Message.ToString());
115 Assert.Fail("Caught Exception : Failed!");
119 testingTarget.Dispose();
120 tlog.Debug(tag, $"LayoutControllerRequestLayoutParentIsNUll END (OK)");
125 [Description("LayoutController GetCoreAnimation.")]
126 [Property("SPEC", "Tizen.NUI.LayoutController.GetCoreAnimation M")]
127 [Property("SPEC_URL", "-")]
128 [Property("CRITERIA", "MR")]
129 [Property("AUTHOR", "guowei.wang@samsung.com")]
130 public void LayoutControllerGetCoreAnimation()
132 tlog.Debug(tag, $"LayoutControllerGetCoreAnimation START");
134 var testingTarget = new LayoutController(Window.Instance);
135 Assert.IsNotNull(testingTarget, "Can't create success object LayoutController");
136 Assert.IsInstanceOf<LayoutController>(testingTarget, "Should be an instance of LayoutController type.");
138 var result = testingTarget.GetCoreAnimation();
139 tlog.Debug(tag, "Get core animation : " + result);
141 testingTarget.Dispose();
142 tlog.Debug(tag, $"LayoutControllerGetCoreAnimation END (OK)");