示例#1
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");
        }
示例#2
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");
        }
示例#3
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");
        }
示例#4
0
        public void GestureConstructor()
        {
            tlog.Debug(tag, $"GestureConstructor START");

            var testingTarget = new Gesture(longPressGesture);

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

            testingTarget.Dispose();
            tlog.Debug(tag, $"GestureConstructor END (OK)");
            Assert.Pass("GestureConstructor");
        }
示例#5
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");
        }
示例#6
0
        public void GestureState()
        {
            tlog.Debug(tag, $"GestureState START");

            var testingTarget = new Gesture(longPressGesture);

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

            try
            {
                var state = testingTarget.State;
                tlog.Debug(tag, "state : " + state);
            }
            catch (Exception e)
            {
                tlog.Debug(tag, "Caught Exception" + e.ToString());
                Assert.Fail("Caught Exception" + e.ToString());
            }

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