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();
47 tlog.Debug(tag, $"LayoutControllerGetId END (OK)");
52 [Description("LayoutController RequestLayout.")]
53 [Property("SPEC", "Tizen.NUI.LayoutController.RequestLayout M")]
54 [Property("SPEC_URL", "-")]
55 [Property("CRITERIA", "MR")]
56 [Property("AUTHOR", "guowei.wang@samsung.com")]
57 public void LayoutControllerRequestLayout()
59 tlog.Debug(tag, $"LayoutControllerRequestLayout START");
61 var testingTarget = new LayoutController(Window.Instance);
62 Assert.IsNotNull(testingTarget, "Can't create success object LayoutController");
63 Assert.IsInstanceOf<LayoutController>(testingTarget, "Should be an instance of LayoutController type.");
65 using (LayoutItem layoutItem = new LayoutItem())
67 using (View view = new View())
69 view.Layout = layoutItem;
70 view.Name = "parentView";
74 testingTarget.RequestLayout(layoutItem);
78 tlog.Debug(tag, e.Message.ToString());
79 Assert.Fail("Caught Exception : Failed!");
85 testingTarget.Dispose();
86 tlog.Debug(tag, $"LayoutControllerRequestLayout END (OK)");