예제 #1
0
        public void ViewLayoutDirectionChangedSignalEmit()
        {
            tlog.Debug(tag, $"ViewLayoutDirectionChangedSignalEmit 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 ViewLayoutDirectionChangedSignal();

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

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

            testingTarget.Dispose();

            tlog.Debug(tag, $"ViewLayoutDirectionChangedSignalEmit END (OK)");
        }
예제 #2
0
        public void ViewLayoutDirectionChangedSignalConnect()
        {
            tlog.Debug(tag, $"ViewLayoutDirectionChangedSignalConnect START");

            var testingTarget = new ViewLayoutDirectionChangedSignal();

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

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

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

                testingTarget.Dispose();
            }

            tlog.Debug(tag, $"ViewLayoutDirectionChangedSignalConstructor END (OK)");
        }
예제 #4
0
        public void ViewLayoutDirectionChangedSignalEmpty()
        {
            tlog.Debug(tag, $"ViewLayoutDirectionChangedSignalEmpty START");

            var testingTarget = new ViewLayoutDirectionChangedSignal();

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

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

            testingTarget.Dispose();

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