Beispiel #1
0
        public void WheelSignalEmit()
        {
            tlog.Debug(tag, $"WheelSignalEmit 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 WheelSignal();
                Assert.IsNotNull(testingTarget, "Should be not null!");
                Assert.IsInstanceOf <WheelSignal>(testingTarget, "Should be an Instance of WheelSignal!");

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

                testingTarget.Dispose();
            }

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

            var testingTarget = new WheelSignal();

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

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

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

                testingTarget.Dispose();
            }

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

            var testingTarget = new WheelSignal();

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

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

            testingTarget.Dispose();

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