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/Transition/TransitionItemBase")]
13 public class InternalTransitionItemBaseTest
15 private const string tag = "NUITEST";
20 tlog.Info(tag, "Init() is called!");
26 tlog.Info(tag, "Destroy() is called!");
31 [Description("TransitionItemBase constructor.")]
32 [Property("SPEC", "Tizen.NUI.TransitionItemBase.TransitionItemBase C")]
33 [Property("SPEC_URL", "-")]
34 [Property("CRITERIA", "CONSTR")]
35 [Property("AUTHOR", "guowei.wang@samsung.com")]
36 public void TransitionItemBaseConstructor()
38 tlog.Debug(tag, $"TransitionItemBaseConstructor START");
40 using (View view = new View())
42 var testingTarget = new TransitionItemBase(view.SwigCPtr.Handle, false);
43 Assert.IsNotNull(testingTarget, "Should be not null!");
44 Assert.IsInstanceOf<TransitionItemBase>(testingTarget, "Should be an Instance of TransitionItemBase!");
46 testingTarget.Dispose();
49 tlog.Debug(tag, $"TransitionItemBaseConstructor END (OK)");
54 //[Description("TransitionItemBase TimePeriod.")]
55 //[Property("SPEC", "Tizen.NUI.TransitionItemBase.TimePeriod A")]
56 //[Property("SPEC_URL", "-")]
57 //[Property("CRITERIA", "PW")]
58 //[Property("AUTHOR", "guowei.wang@samsung.com")]
59 //public void TransitionItemBaseTimePeriod()
61 // tlog.Debug(tag, $"TransitionItemBaseTimePeriod START");
63 // using (View view = new View())
65 // var testingTarget = new TransitionItemBase(view.SwigCPtr.Handle, false);
66 // Assert.IsNotNull(testingTarget, "Should be not null!");
67 // Assert.IsInstanceOf<TransitionItemBase>(testingTarget, "Should be an Instance of TransitionItemBase!");
69 // testingTarget.TimePeriod = new TimePeriod(300);
70 // tlog.Debug(tag, "TiemPeriod : " + testingTarget.TimePeriod);
72 // testingTarget.Dispose();
75 // tlog.Debug(tag, $"TransitionItemBaseTimePeriod END (OK)");
80 //[Description("TransitionItemBase AlphaFunction.")]
81 //[Property("SPEC", "Tizen.NUI.TransitionItemBase.AlphaFunction A")]
82 //[Property("SPEC_URL", "-")]
83 //[Property("CRITERIA", "PRW")]
84 //[Property("AUTHOR", "guowei.wang@samsung.com")]
85 //public void TransitionItemBaseAlphaFunction()
87 // tlog.Debug(tag, $"TransitionItemBaseAlphaFunction START");
89 // using (View view = new View())
91 // var testingTarget = new TransitionItemBase(view.SwigCPtr.Handle, false);
92 // Assert.IsNotNull(testingTarget, "Should be not null!");
93 // Assert.IsInstanceOf<TransitionItemBase>(testingTarget, "Should be an Instance of TransitionItemBase!");
95 // testingTarget.AlphaFunction = new AlphaFunction(Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOut);
96 // tlog.Debug(tag, "AlphaFunction : " + testingTarget.AlphaFunction.ToString());
98 // testingTarget.Dispose();
101 // tlog.Debug(tag, $"TransitionItemBaseAlphaFunction END (OK)");
106 [Description("TransitionItemBase TransitionWithChild.")]
107 [Property("SPEC", "Tizen.NUI.TransitionItemBase.TransitionWithChild A")]
108 [Property("SPEC_URL", "-")]
109 [Property("CRITERIA", "PW")]
110 [Property("AUTHOR", "guowei.wang@samsung.com")]
111 public void TransitionItemBaseTransitionWithChild()
113 tlog.Debug(tag, $"TransitionItemBaseTransitionWithChild START");
115 using (View view = new View())
117 var testingTarget = new TransitionItemBase(view.SwigCPtr.Handle, false);
118 Assert.IsNotNull(testingTarget, "Should be not null!");
119 Assert.IsInstanceOf<TransitionItemBase>(testingTarget, "Should be an Instance of TransitionItemBase!");
123 testingTarget.TransitionWithChild = false;
127 tlog.Debug(tag, e.Message.ToString());
128 Assert.Fail("Caught Exception : Failed!");
131 testingTarget.Dispose();
134 tlog.Debug(tag, $"TransitionItemBaseTransitionWithChild END (OK)");
139 [Description("TransitionItemBase DownCast.")]
140 [Property("SPEC", "Tizen.NUI.TransitionItemBase.DownCast M")]
141 [Property("SPEC_URL", "-")]
142 [Property("CRITERIA", "MR")]
143 [Property("AUTHOR", "guowei.wang@samsung.com")]
144 public void TransitionItemBaseDownCast()
146 tlog.Debug(tag, $"TransitionItemBaseDownCast START");
148 using (View view = new View())
150 var testingTarget = new TransitionItemBase(view.SwigCPtr.Handle, false);
151 Assert.IsNotNull(testingTarget, "Should be not null!");
152 Assert.IsInstanceOf<TransitionItemBase>(testingTarget, "Should be an Instance of TransitionItemBase!");
156 TransitionItemBase.DownCast(testingTarget);
160 tlog.Error(tag, "Caught Exception" + e.ToString());
161 LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
162 Assert.Fail("Caught Exception" + e.ToString());
165 testingTarget.Dispose();
168 tlog.Debug(tag, $"TransitionItemBaseDownCast END (OK)");
173 [Description("TransitionItemBase Assign.")]
174 [Property("SPEC", "Tizen.NUI.TransitionItemBase.Assign M")]
175 [Property("SPEC_URL", "-")]
176 [Property("CRITERIA", "MR")]
177 [Property("AUTHOR", "guowei.wang@samsung.com")]
178 public void TransitionItemBaseAssign()
180 tlog.Debug(tag, $"TransitionItemBaseAssign START");
182 using (View view = new View())
184 var testingTarget = new TransitionItemBase(view.SwigCPtr.Handle, false);
185 Assert.IsNotNull(testingTarget, "Should be not null!");
186 Assert.IsInstanceOf<TransitionItemBase>(testingTarget, "Should be an Instance of TransitionItemBase!");
190 testingTarget.Assign(testingTarget);
194 tlog.Error(tag, "Caught Exception" + e.ToString());
195 LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
196 Assert.Fail("Caught Exception" + e.ToString());
199 testingTarget.Dispose();
202 tlog.Debug(tag, $"TransitionItemBaseAssign END (OK)");