示例#1
0
        public void GestureDetectorDetach()
        {
            tlog.Debug(tag, $"GestureDetectorDetach START");
            LongPressGestureDetector ret = new LongPressGestureDetector();

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

            View view = new View();

            ret.Attach(view);
            ret.Detach(view);
            ret.Dispose();

            tlog.Debug(tag, $"GestureDetectorDetach END (OK)");
            Assert.Pass("GestureDetectorDetach");
        }
示例#2
0
        public void GestureDetectorGetAttachedView()
        {
            tlog.Debug(tag, $"GestureDetectorGetAttachedView START");

            var testingTarget = new LongPressGestureDetector();

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

            using (View view = new View())
            {
                testingTarget.Attach(view);
                testingTarget.GetAttachedView(0);
                testingTarget.Detach(view);
            }

            testingTarget.Dispose();
            tlog.Debug(tag, $"GestureDetectorGetAttachedView END (OK)");
            Assert.Pass("GestureDetectorGetAttachedView");
        }
示例#3
0
        public void GestureDetectorAttach()
        {
            tlog.Debug(tag, $"GestureDetectorAttach START");

            var testingTarget = new LongPressGestureDetector();

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

            using (View view = new View())
            {
                Window.Instance.GetDefaultLayer().Add(view);
                testingTarget.Attach(view);
                testingTarget.Detach(view);
                Window.Instance.GetDefaultLayer().Remove(view);
            }

            testingTarget.Dispose();
            tlog.Debug(tag, $"GestureDetectorAttach END (OK)");
            Assert.Pass("GestureDetectorAttach");
        }