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/Utility/ConnectionTrackerInterface")]
13 public class InternalConnectionTrackerInterfaceTest
15 private const string tag = "NUITEST";
16 private delegate bool dummyCallback(IntPtr pageTurnSignal);
17 private bool OnDummyCallback(IntPtr data)
22 internal class MyConnectionTrackerInterface : ConnectionTrackerInterface
24 public MyConnectionTrackerInterface(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
31 tlog.Info(tag, "Init() is called!");
37 tlog.Info(tag, "Destroy() is called!");
42 [Description("ConnectionTrackerInterface constructor.")]
43 [Property("SPEC", "Tizen.NUI.ConnectionTrackerInterface.ConnectionTrackerInterface C")]
44 [Property("SPEC_URL", "-")]
45 [Property("CRITERIA", "CONSTR")]
46 [Property("AUTHOR", "guowei.wang@samsung.com")]
47 public void ConnectionTrackerInterfaceConstructor()
49 tlog.Debug(tag, $"ConnectionTrackerInterfaceConstructor START");
51 using (View view = new View())
53 var testingTarget = new ConnectionTrackerInterface(view.SwigCPtr.Handle, false);
54 Assert.IsNotNull(testingTarget, "Should be not null!");
55 Assert.IsInstanceOf<ConnectionTrackerInterface>(testingTarget, "Should be an Instance of ConnectionTrackerInterface!");
57 testingTarget.Dispose();
60 tlog.Debug(tag, $"ConnectionTrackerInterfaceConstructor END (OK)");
65 [Description("ConnectionTrackerInterface getCPtr.")]
66 [Property("SPEC", "Tizen.NUI.ConnectionTrackerInterface.getCPtr M")]
67 [Property("SPEC_URL", "-")]
68 [Property("CRITERIA", "MR")]
69 [Property("AUTHOR", "guowei.wang@samsung.com")]
70 public void ConnectionTrackerInterfacegetCPtr()
72 tlog.Debug(tag, $"ConnectionTrackerInterfacegetCPtr START");
74 using (View view = new View())
76 var testingTarget = new MyConnectionTrackerInterface(view.SwigCPtr.Handle, false);
77 Assert.IsNotNull(testingTarget, "Should be not null!");
78 Assert.IsInstanceOf<ConnectionTrackerInterface>(testingTarget, "Should be an Instance of ConnectionTrackerInterface!");
82 ConnectionTrackerInterface.getCPtr(testingTarget);
86 tlog.Debug(tag, e.Message.ToString());
87 Assert.Fail("Caught Exception: Failed!");
90 testingTarget.Dispose();
93 tlog.Debug(tag, $"ConnectionTrackerInterfacegetCPtr END (OK)");
98 //[Description("ConnectionTrackerInterface SignalConnected.")]
99 //[Property("SPEC", "Tizen.NUI.ConnectionTrackerInterface.SignalConnected M")]
100 //[Property("SPEC_URL", "-")]
101 //[Property("CRITERIA", "MR")]
102 //[Property("AUTHOR", "guowei.wang@samsung.com")]
103 //public void ConnectionTrackerInterfaceSignalConnected()
105 // tlog.Debug(tag, $"ConnectionTrackerInterfaceSignalConnected START");
107 // using (View view = new View())
109 // var testingTarget = new ConnectionTrackerInterface(view.SwigCPtr.Handle, false);
110 // Assert.IsNotNull(testingTarget, "Should be not null!");
111 // Assert.IsInstanceOf<ConnectionTrackerInterface>(testingTarget, "Should be an Instance of ConnectionTrackerInterface!");
115 // var slotObserver = new SlotObserver(testingTarget.SwigCPtr.Handle, false);
116 // var callback = new SWIGTYPE_p_CallbackBase(testingTarget.SwigCPtr.Handle);
117 // testingTarget.SignalConnected(slotObserver, callback);
119 // catch (Exception e)
121 // tlog.Debug(tag, e.Message.ToString());
122 // Assert.Fail("Caught Exception: Failed!");
125 // testingTarget.Dispose();
128 // tlog.Debug(tag, $"ConnectionTrackerInterfaceSignalConnected END (OK)");