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

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

                testingTarget.Dispose();
            }

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

            var testingTarget = new ViewSignal();

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

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

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

                testingTarget.Dispose();
            }

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

            var testingTarget = new ViewSignal();

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

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

            testingTarget.Dispose();

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