Esempio n. 1
0
        public void GestureTime()
        {
            tlog.Debug(tag, $"GestureTime START");
            try
            {
                var longPressGesture = new LongPressGesture(Gesture.StateType.Cancelled);
                Assert.IsNotNull(longPressGesture, "Can't create success object LongPressGesture");
                var gesture = new Gesture(longPressGesture);
                Assert.IsNotNull(gesture, "Can't create success object Gesture");
                Assert.IsInstanceOf <Gesture>(gesture, "Should be an instance of Gesture type.");
                uint time = gesture.Time;
                Assert.GreaterOrEqual(time, 0, "Should be greater or equal 0");

                gesture.Dispose();
                longPressGesture.Dispose();
            }
            catch (Exception e)
            {
                Tizen.Log.Error(tag, "Caught Exception" + e.ToString());

                Assert.Fail("Caught Exception" + e.ToString());
            }
            tlog.Debug(tag, $"GestureTime END (OK)");
            Assert.Pass("GestureTime");
        }
Esempio n. 2
0
        public void GestureState()
        {
            tlog.Debug(tag, $"GestureState START");
            try
            {
                var longPressGesture = new LongPressGesture(Gesture.StateType.Cancelled);
                Assert.IsNotNull(longPressGesture, "Can't create success object LongPressGesture");
                var gesture = new Gesture(longPressGesture);
                Assert.IsNotNull(gesture, "Can't create success object Gesture");
                Assert.IsInstanceOf <Gesture>(gesture, "Should be an instance of Gesture type.");
                Gesture.StateType state = gesture.State;
                Assert.AreEqual(Gesture.StateType.Cancelled, state, "Should be same value");

                gesture.Dispose();
                longPressGesture.Dispose();
            }
            catch (Exception e)
            {
                Tizen.Log.Error(tag, "Caught Exception" + e.ToString());

                Assert.Fail("Caught Exception" + e.ToString());
            }
            tlog.Debug(tag, $"GestureState END (OK)");
            Assert.Pass("GestureState");
        }
Esempio n. 3
0
        public void LongPressGestureConstructor()
        {
            tlog.Debug(tag, $"LongPressGestureConstructor START");
            Gesture.StateType state = Gesture.StateType.Finished;
            LongPressGesture  ret1  = new LongPressGesture(state);

            ret1.Dispose();

            tlog.Debug(tag, $"LongPressGestureConstructor END (OK)");
            Assert.Pass("LongPressGestureConstructor");
        }
Esempio n. 4
0
        public void GestureConstructor()
        {
            tlog.Debug(tag, $"GestureConstructor START");

            var longPressGesture = new LongPressGesture(Gesture.StateType.Cancelled);
            var gesture          = new Gesture(longPressGesture);

            longPressGesture.Dispose();
            gesture.Dispose();
            tlog.Debug(tag, $"GestureConstructor END (OK)");
            Assert.Pass("GestureConstructor");
        }
Esempio n. 5
0
        public void LongPressGestureLocalPoint()
        {
            tlog.Debug(tag, $"LongPressGestureLocalPoint START");
            Gesture.StateType state = Gesture.StateType.Finished;
            LongPressGesture  ret1  = new LongPressGesture(state);

            Vector2 v = ret1.LocalPoint;

            ret1.Dispose();

            tlog.Debug(tag, $"LongPressGestureLocalPoint END (OK)");
            Assert.Pass("LongPressGestureLocalPoint");
        }
Esempio n. 6
0
        public void LongPressGestureConstructor()
        {
            tlog.Debug(tag, $"LongPressGestureConstructor START");

            var testingTarget = new LongPressGesture(Gesture.StateType.Finished);

            Assert.IsNotNull(testingTarget, "Can't create success object Hover");
            Assert.IsInstanceOf <LongPressGesture>(testingTarget, "Should be an instance of Hover type.");

            testingTarget.Dispose();
            tlog.Debug(tag, $"LongPressGestureConstructor END (OK)");
            Assert.Pass("LongPressGestureConstructor");
        }
Esempio n. 7
0
        public void LongPressGestureGetLongPressGestureFromPtr()
        {
            tlog.Debug(tag, $"LongPressGestureGetLongPressGestureFromPtr START");
            Gesture.StateType state = Gesture.StateType.Finished;
            LongPressGesture  ret1  = new LongPressGesture(state);

            LongPressGesture ret = LongPressGesture.GetLongPressGestureFromPtr(LongPressGesture.getCPtr(ret1).Handle);

            ret1.Dispose();
            ret.Dispose();


            tlog.Debug(tag, $"LongPressGestureGetLongPressGestureFromPtr END (OK)");
            Assert.Pass("LongPressGestureGetLongPressGestureFromPtr");
        }
Esempio n. 8
0
        public void GetstureGetGestureFromPtr()
        {
            tlog.Debug(tag, $"GetstureGetGestureFromPtr START");

            var longPressGesture = new LongPressGesture(Gesture.StateType.Cancelled);
            var gesture          = new Gesture(longPressGesture);

            Gesture ret = Gesture.GetGestureFromPtr(Gesture.getCPtr(gesture).Handle);

            Assert.IsNotNull(ret, "Can't create success object Gesture");
            Assert.IsInstanceOf <Gesture>(ret, "Should be an instance of Gesture type.");

            ret.Dispose();
            gesture.Dispose();
            longPressGesture.Dispose();

            tlog.Debug(tag, $"GetstureGetGestureFromPtr END (OK)");
            Assert.Pass("GetstureGetGestureFromPtr");
        }
Esempio n. 9
0
        public void LongPressGesturegetCPtr()
        {
            tlog.Debug(tag, $"LongPressGesturegetCPtr START");

            var testingTarget = new LongPressGesture(Gesture.StateType.Finished);

            Assert.IsNotNull(testingTarget, "Can't create success object Hover");
            Assert.IsInstanceOf <LongPressGesture>(testingTarget, "Should be an instance of Hover type.");

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

            testingTarget.Dispose();
            tlog.Debug(tag, $"LongPressGesturegetCPtr END (OK)");
            Assert.Pass("LongPressGestureLocalPoint");
        }
Esempio n. 10
0
 public void Destroy()
 {
     longPressGesture?.Dispose();
     tlog.Info(tag, "Destroy() is called!");
 }