Example #1
0
        public void AutofillContainerDownCast()
        {
            tlog.Debug(tag, $"AutofillContainerDownCast START");
            BaseHandle        handle = new BaseHandle();
            AutofillContainer a1     = AutofillContainer.DownCast(handle);

            handle.Dispose();

            tlog.Debug(tag, $"AutofillContainerDownCast END (OK)");
            Assert.Pass("AutofillContainerDownCast");
        }
Example #2
0
        public void BaseHandleConstructor()
        {
            tlog.Debug(tag, $"BaseHandleConstructor START");

            var testingTarget = new BaseHandle();

            Assert.IsNotNull(testingTarget, "null handle");
            Assert.IsInstanceOf <BaseHandle>(testingTarget, "Should return BaseHandle instance.");

            var swigCMemOwn = testingTarget.SwigCMemOwn;

            Assert.IsTrue(swigCMemOwn);

            testingTarget.Dispose();
            tlog.Debug(tag, $"BaseHandleConstructor END (OK)");
        }
Example #3
0
        public void BaseHandleConstructorWithBaseHandle()
        {
            tlog.Debug(tag, $"BaseHandleConstructorWithBaseHandle START");

            BaseHandle testingTarget = null;

            using (BaseHandle view = new View())
            {
                testingTarget = new BaseHandle(view);
                Assert.IsNotNull(testingTarget, "null handle");
                Assert.IsInstanceOf <BaseHandle>(testingTarget, "Should return BaseHandle instance.");
            }

            testingTarget.Dispose();
            tlog.Debug(tag, $"BaseHandleConstructorWithBaseHandle END (OK)");
        }
Example #4
0
        public void BaseHandleDispose()
        {
            tlog.Debug(tag, $"BaseHandleDispose START");

            var testingTarget = new BaseHandle();

            Assert.IsNotNull(testingTarget, "null handle");
            Assert.IsInstanceOf <BaseHandle>(testingTarget, "Should return BaseHandle instance.");

            try
            {
                testingTarget.Dispose();
            }
            catch (Exception e)
            {
                tlog.Error(tag, "Caught Exception" + e.ToString());
                LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
                Assert.Fail("Caught Exception" + e.ToString());
            }

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