Esempio n. 1
0
        public void TouchDataSignalEmit()
        {
            tlog.Debug(tag, $"TouchDataSignalEmit START");
            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}");

            using (View view = new View())
            {
                using (Touch touch = Touch.GetTouchFromPtr(view.SwigCPtr.Handle))
                {
                    var testingTarget = new TouchDataSignal();
                    Assert.IsNotNull(testingTarget, "Should be not null!");
                    Assert.IsInstanceOf <TouchDataSignal>(testingTarget, "Should be an Instance of TouchDataSignal!");

                    try
                    {
                        testingTarget.Emit(view, touch);
                    }
                    catch (Exception e)
                    {
                        tlog.Debug(tag, e.Message.ToString());
                        Assert.Fail("Caught Exception: Failed!");
                    }

                    testingTarget.Dispose();
                }
            }

            tlog.Debug(tag, $"TouchDataSignalEmit END (OK)");
        }
Esempio n. 2
0
        public void TouchDataSignalConnect()
        {
            tlog.Debug(tag, $"TouchDataSignalConnect START");

            var testingTarget = new TouchDataSignal();

            Assert.IsNotNull(testingTarget, "Should be not null!");
            Assert.IsInstanceOf <TouchDataSignal>(testingTarget, "Should be an Instance of TouchDataSignal!");

            try
            {
                dummyCallback callback = OnDummyCallback;
                testingTarget.Connect(callback);
                testingTarget.Disconnect(callback);
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception: Failed!");
            }

            testingTarget.Dispose();

            tlog.Debug(tag, $"TouchDataSignalConnect END (OK)");
        }
Esempio n. 3
0
        public void TouchDataSignalConstructor()
        {
            tlog.Debug(tag, $"TouchDataSignalConstructor START");

            using (View view = new View())
            {
                var testingTarget = new TouchDataSignal(view.SwigCPtr.Handle, false);
                Assert.IsNotNull(testingTarget, "Should be not null!");
                Assert.IsInstanceOf <TouchDataSignal>(testingTarget, "Should be an Instance of TouchDataSignal!");

                testingTarget.Dispose();
            }

            tlog.Debug(tag, $"TouchDataSignalConstructor END (OK)");
        }
Esempio n. 4
0
        public void TouchDataSignalEmpty()
        {
            tlog.Debug(tag, $"TouchDataSignalEmpty START");

            var testingTarget = new TouchDataSignal();

            Assert.IsNotNull(testingTarget, "Should be not null!");
            Assert.IsInstanceOf <TouchDataSignal>(testingTarget, "Should be an Instance of TouchDataSignal!");

            try
            {
                testingTarget.Empty();
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception: Failed!");
            }

            testingTarget.Dispose();

            tlog.Debug(tag, $"TouchDataSignalEmpty END (OK)");
        }