Exemplo n.º 1
0
        public void WindowFocusSignalTypeEmit()
        {
            tlog.Debug(tag, $"WindowFocusSignalTypeEmit 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 (Window window = new Window(new Rectangle(0, 0, 2, 2), false))
            {
                var testingTarget = new WindowFocusSignalType();
                Assert.IsNotNull(testingTarget, "Should be not null!");
                Assert.IsInstanceOf <WindowFocusSignalType>(testingTarget, "Should be an Instance of WindowFocusSignalType!");

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

                testingTarget.Dispose();
            }

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

            var testingTarget = new WindowFocusSignalType();

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

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

            var testingTarget = new WindowFocusSignalType();

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

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

            testingTarget.Dispose();

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