Exemplo n.º 1
0
        public void WatchTimeSignalEmit()
        {
            tlog.Debug(tag, $"WatchTimeSignalEmit START");

            if (IsWearable())
            {
                var currentPid = global::System.Diagnostics.Process.GetCurrentProcess().Id;
                var currentTid = global::System.Threading.Thread.CurrentThread.ManagedThreadId;

                tlog.Debug(tag, $"thread check! main pid={App.mainPid}, current pid={currentPid}, main tid={App.mainTid}, current tid={currentTid}");

                var testingTarget = new WatchTimeSignal();
                Assert.IsNotNull(testingTarget, "should be not null");
                Assert.IsInstanceOf <WatchTimeSignal>(testingTarget, "should be an instance of testing target class!");

                Application application = new Application();
                WatchTime   watchTime   = new WatchTime();
                testingTarget.Emit(application, watchTime);

                application.Dispose();
                watchTime.Dispose();
                testingTarget.Dispose();
                tlog.Debug(tag, $"WatchTimeSignalEmit END (OK)");
            }
            else
            {
                tlog.Debug(tag, $"WatchTimeSignalEmit END (OK)");
                Assert.Pass("Not Supported profile");
            }
        }
Exemplo n.º 2
0
        public void WatchTimeSignalConstructor()
        {
            tlog.Debug(tag, $"WatchTimeSignalConstructor START");

            using (ImageView imageView = new ImageView())
            {
                var testingTarget = new WatchTimeSignal(imageView.SwigCPtr.Handle, false);
                Assert.IsNotNull(testingTarget, "should be not null");
                Assert.IsInstanceOf <WatchTimeSignal>(testingTarget, "should be an instance of testing target class!");

                testingTarget.Dispose();
            }

            tlog.Debug(tag, $"WatchTimeSignalConstructor END (OK)");
        }
Exemplo n.º 3
0
        public void WatchTimeSignalConstructor()
        {
            tlog.Debug(tag, $"WatchTimeSignalConstructor START");

            if (IsWearable())
            {
                var testingTarget = new WatchTimeSignal();

                Assert.IsNotNull(testingTarget, "should be not null");
                Assert.IsInstanceOf <WatchTimeSignal>(testingTarget, "should be an instance of testing target class!");

                testingTarget.Dispose();
                tlog.Debug(tag, $"WatchTimeSignalConstructor END (OK)");
            }
            else
            {
                tlog.Debug(tag, $"WatchTimeSignalConstructor END (OK)");
                Assert.Pass("Not Supported profile");
            }
        }
Exemplo n.º 4
0
        public void WatchTimeSignalGetConnectionCount()
        {
            tlog.Debug(tag, $"WatchTimeSignalGetConnectionCount START");

            if (IsWearable())
            {
                var testingTarget = new WatchTimeSignal();
                Assert.IsNotNull(testingTarget, "should be not null");
                Assert.IsInstanceOf <WatchTimeSignal>(testingTarget, "should be an instance of testing target class!");

                var result = testingTarget.GetConnectionCount();
                Assert.IsTrue(result == 0, "result should be 0");

                testingTarget.Dispose();
                tlog.Debug(tag, $"WatchTimeSignalGetConnectionCount END (OK)");
            }
            else
            {
                tlog.Debug(tag, $"WatchTimeSignalGetConnectionCount END (OK)");
                Assert.Pass("Not Supported profile");
            }
        }
Exemplo n.º 5
0
        public void WatchTimeSignalDisconnection()
        {
            tlog.Debug(tag, $"WatchTimeSignalDisconnection START");

            if (IsWearable())
            {
                var testingTarget = new WatchTimeSignal();
                Assert.IsNotNull(testingTarget, "should be not null");
                Assert.IsInstanceOf <WatchTimeSignal>(testingTarget, "should be an instance of testing target class!");

                dummyCallback callback = OnDummyCallback;
                testingTarget.Connect(callback);
                testingTarget.Disconnect(callback);
                testingTarget.Dispose();
                tlog.Debug(tag, $"WatchTimeSignalDisconnection END (OK)");
            }
            else
            {
                tlog.Debug(tag, $"WatchTimeSignalDisconnection END (OK)");
                Assert.Pass("Not Supported profile");
            }
        }
Exemplo n.º 6
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WatchTimeSignal obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }