コード例 #1
0
        public void ComponentApplicationCreateNativeSignal()
        {
            tlog.Debug(tag, $"ComponentApplicationCreateNativeSignal START");

            ImageView view          = new ImageView();
            var       testingTarget = new ComponentApplication(view.SwigCPtr.Handle, false);

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

            try
            {
                var result = testingTarget.CreateNativeSignal();
                Assert.IsNotNull(result, "should be not null");
                Assert.IsInstanceOf <ApplicationSignal>(result, "should be an instance of ApplicationSignal class!");
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception: Failed!");
            }

            view.Dispose();
            testingTarget.Dispose();
            tlog.Debug(tag, $"ComponentApplicationCreateNativeSignal END (OK)");
        }
コード例 #2
0
        public void ComponentApplicationCreateNativeSignal()
        {
            tlog.Debug(tag, $"ComponentApplicationCreateNativeSignal START");

            using (Widget widget = new Widget())
            {
                var testingTarget = new ComponentApplication(widget.SwigCPtr.Handle, true);
                Assert.IsNotNull(testingTarget, "should be not null");
                Assert.IsInstanceOf <ComponentApplication>(testingTarget, "should be an instance of testing target class!");

                var result = testingTarget.CreateNativeSignal();
                Assert.IsNotNull(result, "should be not null");
                Assert.IsInstanceOf <ApplicationSignal>(result, "should be an instance of ApplicationSignal class!");

                testingTarget.Dispose();
            }

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