Beispiel #1
0
        public void TouchPointContainerEnumeratorCurrentWithNullCurrentObject()
        {
            tlog.Debug(tag, $"TouchPointContainerEnumeratorCurrentWithNullCurrentObject START");

            using (TouchPointContainer container = TouchPointContainer.Repeat(new TouchPoint(1, TouchPoint.StateType.Started, 0.0f, 0.0f), 2))
            {
                var testingTarget = container.GetEnumerator();
                Assert.IsNotNull(testingTarget, "Should be not null!");
                Assert.IsInstanceOf <TouchPointContainer.TouchPointContainerEnumerator>(testingTarget, "Should be an Instance of TouchPointContainerEnumerator!");

                try
                {
                    testingTarget.MoveNext();
                    testingTarget.MoveNext();
                    testingTarget.MoveNext();
                    var result = testingTarget.Current;
                }
                catch (InvalidOperationException e)
                {
                    tlog.Debug(tag, e.Message.ToString());
                    testingTarget.Dispose();
                    tlog.Debug(tag, $"TouchPointContainerEnumeratorCurrentWithNullCurrentObject END (OK)");
                    Assert.Pass("Caught InvalidOperationException : Passed!");
                }
            }
        }
Beispiel #2
0
        public void TouchPointContainerEnumeratorReset()
        {
            tlog.Debug(tag, $"TouchPointContainerEnumeratorReset START");

            using (TouchPointContainer container = TouchPointContainer.Repeat(new TouchPoint(1, TouchPoint.StateType.Started, 0.0f, 0.0f), 2))
            {
                var testingTarget = container.GetEnumerator();
                Assert.IsNotNull(testingTarget, "Should be not null!");
                Assert.IsInstanceOf <TouchPointContainer.TouchPointContainerEnumerator>(testingTarget, "Should be an Instance of TouchPointContainerEnumerator!");

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

                testingTarget.Dispose();
            }

            tlog.Debug(tag, $"TouchPointContainerEnumeratorReset END (OK)");
        }
Beispiel #3
0
 /// <since_tizen> 3 </since_tizen>
 public TouchPointContainerEnumerator(TouchPointContainer collection)
 {
     collectionRef = collection;
     currentIndex  = -1;
     currentObject = null;
     currentSize   = collectionRef.Count;
 }
Beispiel #4
0
 public TouchPointContainer(TouchPointContainer other) : this(Interop.TouchPointContainer.new_TouchPointContainer__SWIG_1(TouchPointContainer.getCPtr(other)), true)
 {
     if (NDalicPINVOKE.SWIGPendingException.Pending)
     {
         throw NDalicPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Beispiel #5
0
        public void TouchPointContainerSetRange()
        {
            tlog.Debug(tag, $"TouchPointContainerSetRange START");

            TouchPoint[] arr = new TouchPoint[] { new TouchPoint(1, TouchPoint.StateType.Started, 0.0f, 0.0f), new TouchPoint(2, TouchPoint.StateType.Last, 100.0f, 100.0f) };
            global::System.Collections.ICollection c = arr;

            var testingTarget = new TouchPointContainer(c);

            Assert.IsNotNull(testingTarget, "Should be not null!");
            Assert.IsInstanceOf <TouchPointContainer>(testingTarget, "Should be an Instance of TouchPointContainer!");

            try
            {
                using (TouchPointContainer container = new TouchPointContainer(30))
                {
                    testingTarget.SetRange(0, container);
                }
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception : Failed!");
            }

            tlog.Debug(tag, $"TouchPointContainerSetRange END (OK)");
        }
Beispiel #6
0
 public void SetRange(int index, TouchPointContainer values)
 {
     Interop.TouchPointContainer.TouchPointContainer_SetRange(swigCPtr, index, TouchPointContainer.getCPtr(values));
     if (NDalicPINVOKE.SWIGPendingException.Pending)
     {
         throw NDalicPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Beispiel #7
0
 public void AddRange(TouchPointContainer values)
 {
     NDalicPINVOKE.TouchPointContainer_AddRange(swigCPtr, TouchPointContainer.getCPtr(values));
     if (NDalicPINVOKE.SWIGPendingException.Pending)
     {
         throw NDalicPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Beispiel #8
0
        public TouchPointContainer GetRange(int index, int count)
        {
            global::System.IntPtr cPtr = Interop.TouchPointContainer.TouchPointContainer_GetRange(swigCPtr, index, count);
            TouchPointContainer   ret  = (cPtr == global::System.IntPtr.Zero) ? null : new TouchPointContainer(cPtr, true);

            if (NDalicPINVOKE.SWIGPendingException.Pending)
            {
                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Beispiel #9
0
        public static TouchPointContainer Repeat(TouchPoint value, int count)
        {
            global::System.IntPtr cPtr = Interop.TouchPointContainer.TouchPointContainer_Repeat(TouchPoint.getCPtr(value), count);
            TouchPointContainer   ret  = (cPtr == global::System.IntPtr.Zero) ? null : new TouchPointContainer(cPtr, true);

            if (NDalicPINVOKE.SWIGPendingException.Pending)
            {
                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Beispiel #10
0
        public void TouchPointContainerConstructor()
        {
            tlog.Debug(tag, $"TouchPointContainerConstructor START");

            var testingTarget = new TouchPointContainer();

            Assert.IsNotNull(testingTarget, "Should be not null!");
            Assert.IsInstanceOf <TouchPointContainer>(testingTarget, "Should be an Instance of TouchPointContainer!");

            testingTarget.Dispose();
            tlog.Debug(tag, $"TouchPointContainerConstructor END (OK)");
        }
Beispiel #11
0
        public void TouchPointContainerRepeat()
        {
            tlog.Debug(tag, $"TouchPointContainerRepeat START");

            try
            {
                TouchPointContainer.Repeat(new TouchPoint(1, TouchPoint.StateType.Started, 0.0f, 0.0f), 2);
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception : Failed!");
            }

            tlog.Debug(tag, $"TouchPointContainerRepeat END (OK)");
        }
Beispiel #12
0
        public void TouchPointContainerIsSynchronized()
        {
            tlog.Debug(tag, $"TouchPointContainerIsSynchronized START");

            var testingTarget = new TouchPointContainer();

            Assert.IsNotNull(testingTarget, "Should be not null!");
            Assert.IsInstanceOf <TouchPointContainer>(testingTarget, "Should be an Instance of TouchPointContainer!");

            var result = testingTarget.IsSynchronized;

            tlog.Debug(tag, "IsSynchronized : " + result);

            testingTarget.Dispose();
            tlog.Debug(tag, $"TouchPointContainerIsSynchronized END (OK)");
        }
Beispiel #13
0
        public void TouchPointContainerConstructorWithTouchPointContainer()
        {
            tlog.Debug(tag, $"TouchPointContainerConstructorWithTouchPointContainer START");

            TouchPoint[] arr = new TouchPoint[] { new TouchPoint(1, TouchPoint.StateType.Started, 0.0f, 0.0f), new TouchPoint(2, TouchPoint.StateType.Last, 100.0f, 100.0f) };
            global::System.Collections.ICollection c = arr;

            using (TouchPointContainer container = new TouchPointContainer(c))
            {
                var testingTarget = new TouchPointContainer(container);
                Assert.IsNotNull(testingTarget, "Should be not null!");
                Assert.IsInstanceOf <TouchPointContainer>(testingTarget, "Should be an Instance of TouchPointContainer!");
            }

            tlog.Debug(tag, $"TouchPointContainerConstructorWithTouchPointContainer END (OK)");
        }
Beispiel #14
0
        public void TouchPointContainerCapacity()
        {
            tlog.Debug(tag, $"TouchPointContainerCapacity START");

            var testingTarget = new TouchPointContainer();

            Assert.IsNotNull(testingTarget, "Should be not null!");
            Assert.IsInstanceOf <TouchPointContainer>(testingTarget, "Should be an Instance of TouchPointContainer!");

            testingTarget.Capacity = 100;
            var result = testingTarget.Capacity;

            tlog.Debug(tag, "Capacity : " + result);

            testingTarget.Dispose();
            tlog.Debug(tag, $"TouchPointContainerCapacity END (OK)");
        }
Beispiel #15
0
        public void TouchPointContainerConstructorWithNullICollection()
        {
            tlog.Debug(tag, $"TouchPointContainerConstructorWithNullICollection START");

            ICollection c = null;

            try
            {
                var testingTarget = new TouchPointContainer(c);
            }
            catch (ArgumentNullException e)
            {
                tlog.Debug(tag, e.Message.ToString());
                tlog.Debug(tag, $"TouchPointContainerConstructorWithNullICollection END (OK)");
                Assert.Pass("Caught ArgumentNullException : Passed!");
            }
        }
Beispiel #16
0
        public void TouchPointContainerEnumeratorMoveNext()
        {
            tlog.Debug(tag, $"TouchPointContainerEnumeratorMoveNext START");

            using (TouchPointContainer container = TouchPointContainer.Repeat(new TouchPoint(1, TouchPoint.StateType.Started, 0.0f, 0.0f), 2))
            {
                var testingTarget = container.GetEnumerator();
                Assert.IsNotNull(testingTarget, "Should be not null!");
                Assert.IsInstanceOf <TouchPointContainer.TouchPointContainerEnumerator>(testingTarget, "Should be an Instance of TouchPointContainerEnumerator!");

                var result = testingTarget.MoveNext();
                tlog.Debug(tag, "Current : " + result);

                testingTarget.Dispose();
            }

            tlog.Debug(tag, $"TouchPointContainerEnumeratorMoveNext END (OK)");
        }
Beispiel #17
0
        public void TouchPointContainerGetEnumerator()
        {
            tlog.Debug(tag, $"TouchPointContainerGetEnumerator START");

            var testingTarget = new TouchPointContainer();

            Assert.IsNotNull(testingTarget, "Should be not null!");
            Assert.IsInstanceOf <TouchPointContainer>(testingTarget, "Should be an Instance of TouchPointContainer!");

            TouchPoint[] arr = new TouchPoint[] { new TouchPoint(1, TouchPoint.StateType.Started, 0.0f, 0.0f), new TouchPoint(2, TouchPoint.StateType.Last, 100.0f, 100.0f) };

            testingTarget.CopyTo(arr);
            var result = testingTarget.GetEnumerator();

            tlog.Debug(tag, "Enumerator : " + result);

            testingTarget.Dispose();
            tlog.Debug(tag, $"TouchPointContainerGetEnumerator END (OK)");
        }
Beispiel #18
0
        public void TouchPointContainerConstructorWithICollection()
        {
            tlog.Debug(tag, $"TouchPointContainerConstructorWithICollection START");

            TouchPoint[] arr = new TouchPoint[] { new TouchPoint(1, TouchPoint.StateType.Started, 0.0f, 0.0f), new TouchPoint(2, TouchPoint.StateType.Last, 100.0f, 100.0f) };
            global::System.Collections.ICollection c = arr;

            try
            {
                var testingTarget = new TouchPointContainer(c);
                tlog.Debug(tag, "Count : " + testingTarget.Count);
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception : Failed!");
            }

            tlog.Debug(tag, $"TouchPointContainerConstructorWithICollection END (OK)");
        }
Beispiel #19
0
        public void TouchPointContainerGetRange()
        {
            tlog.Debug(tag, $"TouchPointContainerGetRange START");

            TouchPoint[] arr = new TouchPoint[] { new TouchPoint(1, TouchPoint.StateType.Started, 0.0f, 0.0f), new TouchPoint(2, TouchPoint.StateType.Last, 100.0f, 100.0f) };
            global::System.Collections.ICollection c = arr;

            var testingTarget = new TouchPointContainer(c);

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

            tlog.Debug(tag, $"TouchPointContainerAddRange END (OK)");
        }
Beispiel #20
0
        public void TouchPointContainerAddRange()
        {
            tlog.Debug(tag, $"TouchPointContainerAddRange START");

            using (TouchPointContainer container = new TouchPointContainer())
            {
                using (TouchPointContainer values = new TouchPointContainer(10))
                {
                    try
                    {
                        container.AddRange(values);
                    }
                    catch (Exception e)
                    {
                        tlog.Debug(tag, e.Message.ToString());
                        Assert.Fail("Caught Exception : Failed!");
                    }
                }
            }

            tlog.Debug(tag, $"TouchPointContainerAddRange END (OK)");
        }
Beispiel #21
0
        public void TouchPointContainerCopyToWithNullArray()
        {
            tlog.Debug(tag, $"TouchPointContainerCopyToWithNullArray START");

            var testingTarget = new TouchPointContainer();

            Assert.IsNotNull(testingTarget, "Should be not null!");
            Assert.IsInstanceOf <TouchPointContainer>(testingTarget, "Should be an Instance of TouchPointContainer!");

            TouchPoint[] arr = null;

            try
            {
                testingTarget.CopyTo(arr);
            }
            catch (ArgumentNullException e)
            {
                tlog.Debug(tag, e.Message.ToString());
                testingTarget.Dispose();
                tlog.Debug(tag, $"TouchPointContainerCopyToWithNullArray END (OK)");
                Assert.Pass("Caught ArgumentNullException :  Passed!");
            }
        }
Beispiel #22
0
        public void TouchPointContainerCopyToWithArrayIndexLessThan0()
        {
            tlog.Debug(tag, $"TouchPointContainerCopyToWithArrayIndexLessThan0 START");

            var testingTarget = new TouchPointContainer();

            Assert.IsNotNull(testingTarget, "Should be not null!");
            Assert.IsInstanceOf <TouchPointContainer>(testingTarget, "Should be an Instance of TouchPointContainer!");

            TouchPoint[] arr = new TouchPoint[] { new TouchPoint(1, TouchPoint.StateType.Started, 0.0f, 0.0f), new TouchPoint(2, TouchPoint.StateType.Last, 100.0f, 100.0f) };

            try
            {
                testingTarget.CopyTo(arr, -2);
            }
            catch (ArgumentOutOfRangeException e)
            {
                tlog.Debug(tag, e.Message.ToString());
                testingTarget.Dispose();
                tlog.Debug(tag, $"TouchPointContainerCopyToWithArrayIndexLessThan0 END (OK)");
                Assert.Pass("Caught ArgumentOutOfRangeException :  Passed!");
            }
        }
Beispiel #23
0
        public void TouchPointContainerClear()
        {
            tlog.Debug(tag, $"TouchPointContainerClear START");

            var testingTarget = TouchPointContainer.Repeat(new TouchPoint(1, TouchPoint.StateType.Started, 0.0f, 0.0f), 2);

            Assert.IsNotNull(testingTarget, "Should be not null!");
            Assert.IsInstanceOf <TouchPointContainer>(testingTarget, "Should be an Instance of TouchPointContainer!");

            testingTarget.Capacity = 5;

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

            tlog.Debug(tag, $"TouchPointContainerClear END (OK)");
        }
Beispiel #24
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TouchPointContainer obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }