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

            var testingTarget = new KeyEventSignal();

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

            try
            {
                using (Key key = new Key())
                {
                    testingTarget.Emit(key);
                }
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception: Failed!");
            }

            testingTarget.Dispose();

            tlog.Debug(tag, $"KeyEventSignalEmit END (OK)");
        }
Ejemplo n.º 2
0
        public void KeyEventSignalConnect()
        {
            tlog.Debug(tag, $"KeyEventSignalConnect START");

            var testingTarget = new KeyEventSignal();

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

            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, $"KeyEventSignalConnect END (OK)");
        }
Ejemplo n.º 3
0
        public void KeyEventSignalConstructor()
        {
            tlog.Debug(tag, $"KeyEventSignalConstructor START");

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

                testingTarget.Dispose();
            }

            tlog.Debug(tag, $"KeyEventSignalConstructor END (OK)");
        }
Ejemplo n.º 4
0
        public void KeyEventSignalEmpty()
        {
            tlog.Debug(tag, $"KeyEventSignalEmpty START");

            var testingTarget = new KeyEventSignal();

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

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

            testingTarget.Dispose();

            tlog.Debug(tag, $"KeyEventSignalEmpty END (OK)");
        }
Ejemplo n.º 5
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(KeyEventSignal obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }