Пример #1
0
        public void ContentReceivedSignalTypeEmit()
        {
            tlog.Debug(tag, $"ContentReceivedSignalTypeEmit 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 ContentReceivedSignalType();

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

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

            testingTarget.Dispose();

            tlog.Debug(tag, $"ContentReceivedSignalTypeEmit END (OK)");
        }
Пример #2
0
        public void ContentReceivedSignalTypeConnect()
        {
            tlog.Debug(tag, $"ContentReceivedSignalTypeConnect START");

            var testingTarget = new ContentReceivedSignalType();

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

            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, $"ContentReceivedSignalTypeConnect END (OK)");
        }
Пример #3
0
        public void ContentReceivedSignalTypeConstructor()
        {
            tlog.Debug(tag, $"ContentReceivedSignalTypeConstructor START");

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

                testingTarget.Dispose();
            }

            tlog.Debug(tag, $"ContentReceivedSignalTypeConstructor END (OK)");
        }
Пример #4
0
        public void ContentReceivedSignalTypeEmpty()
        {
            tlog.Debug(tag, $"ContentReceivedSignalTypeEmpty START");

            var testingTarget = new ContentReceivedSignalType();

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

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

            testingTarget.Dispose();

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