Beispiel #1
0
        public void KeyboardEventSignalTypeEmit()
        {
            tlog.Debug(tag, $"KeyboardEventSignalTypeEmit 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 KeyboardEventSignalType();

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

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

            testingTarget.Dispose();

            tlog.Debug(tag, $"KeyboardEventSignalTypeEmit END (OK)");
        }
Beispiel #2
0
        public void KeyboardEventSignalTypeConnect()
        {
            tlog.Debug(tag, $"KeyboardEventSignalTypeConnect START");

            var testingTarget = new KeyboardEventSignalType();

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

            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, $"KeyboardEventSignalTypeConnect END (OK)");
        }
Beispiel #3
0
        public void KeyboardEventSignalTypeConstructor()
        {
            tlog.Debug(tag, $"KeyboardEventSignalTypeConstructor START");

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

                testingTarget.Dispose();
            }

            tlog.Debug(tag, $"KeyboardEventSignalTypeConstructor END (OK)");
        }
Beispiel #4
0
        public void KeyboardEventSignalTypeEmpty()
        {
            tlog.Debug(tag, $"KeyboardEventSignalTypeEmpty START");

            var testingTarget = new KeyboardEventSignalType();

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

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

            testingTarget.Dispose();

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