public void FlexibleViewLayoutManagerOnFocusSearchFailed()
        {
            tlog.Debug(tag, $"FlexibleViewLayoutManagerOnFocusSearchFailed START");

            var testingTarget = new FlexibleViewLayoutManagerImpl();

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

            using (View view = new View()
            {
                Size = new Size(100, 200)
            })
            {
                FlexibleViewViewHolder focused = new FlexibleViewViewHolder(view);

                using (FlexibleView recyclerView = new FlexibleView()
                {
                    Padding = new Extents(10, 10, 10, 10)
                })
                {
                    FlexibleViewRecycler recycler = new FlexibleViewRecycler(recyclerView);

                    var result = testingTarget.OnFocusSearchFailed(focused, FlexibleViewLayoutManager.Direction.Down, recycler);
                    tlog.Debug(tag, "OnFocusSearchFailed : " + result);
                }
            }

            testingTarget.Dispose();
            tlog.Debug(tag, $"FlexibleViewLayoutManagerOnFocusSearchFailed END (OK)");
        }
        public void FlexibleViewLayoutManagerRemoveAndRecycleViewAt()
        {
            tlog.Debug(tag, $"FlexibleViewLayoutManagerRemoveAndRecycleViewAt START");

            var testingTarget = new FlexibleViewLayoutManagerImpl();

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

            using (FlexibleView view = new FlexibleView()
            {
                Padding = new Extents(10, 10, 10, 10)
            })
            {
                FlexibleViewRecycler recycler = new FlexibleViewRecycler(view);

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

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

            FlexibleViewLayoutManager manager = new FlexibleViewLayoutManagerImpl();

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

            var testingTarget = new OrientationHelperImpl(manager);

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

            using (View view = new View()
            {
                Size = new Size(100, 200)
            })
            {
                FlexibleViewViewHolder holder = new FlexibleViewViewHolder(view);

                var result = testingTarget.GetViewHolderMeasurementInOther(holder);
                tlog.Debug(tag, "GetViewHolderMeasurementInOther : " + result);
            }

            manager.Dispose();
            tlog.Debug(tag, $"OrientationHelperGetViewHolderMeasurementInOther END (OK)");
        }
示例#4
0
        public void OrientationHelperGetTotalSpaceChange()
        {
            tlog.Debug(tag, $"OrientationHelperGetTotalSpaceChange START");

            FlexibleViewLayoutManager manager = new FlexibleViewLayoutManagerImpl();

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

            var testingTarget = new OrientationHelperImpl(manager);

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

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

            manager.Dispose();
            tlog.Debug(tag, $"OrientationHelperGetTotalSpaceChange END (OK)");
        }
        public void FlexibleViewLayoutManagerFindLastVisibleItemView()
        {
            tlog.Debug(tag, $"FlexibleViewLayoutManagerFindLastVisibleItemView START");

            var testingTarget = new FlexibleViewLayoutManagerImpl();

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

            var result = testingTarget.OnFindLastVisibleItemView();

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

            testingTarget.Dispose();
            tlog.Debug(tag, $"FlexibleViewLayoutManagerFindLastVisibleItemView END (OK)");
        }
        public void FlexibleViewLayoutManagerComputeScrollRange()
        {
            tlog.Debug(tag, $"FlexibleViewLayoutManagerComputeScrollRange START");

            var testingTarget = new FlexibleViewLayoutManagerImpl();

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

            var result = testingTarget.ComputeScrollRange();

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

            testingTarget.Dispose();
            tlog.Debug(tag, $"FlexibleViewLayoutManagerComputeScrollRange END (OK)");
        }
        public void FlexibleViewLayoutManagerCanScrollVertically()
        {
            tlog.Debug(tag, $"FlexibleViewLayoutManagerCanScrollVertically START");

            var testingTarget = new FlexibleViewLayoutManagerImpl();

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

            var result = horizontalLayoutManager.CanScrollVertically();

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

            testingTarget.Dispose();
            tlog.Debug(tag, $"FlexibleViewLayoutManagerCanScrollVertically END (OK)");
        }
        public void FlexibleViewLayoutManagerScrollVerticallyBy()
        {
            tlog.Debug(tag, $"FlexibleViewLayoutManagerScrollVerticallyBy START");

            var testingTarget = new FlexibleViewLayoutManagerImpl();

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

            using (FlexibleView view = new FlexibleView()
            {
                Padding = new Extents(10, 10, 10, 10)
            })
            {
                FlexibleViewRecycler recycler = new FlexibleViewRecycler(view);
                var result = testingTarget.ScrollVerticallyBy(1.0f, recycler, false);
                tlog.Debug(tag, "ScrollVerticallyBy : " + result);
            }

            testingTarget.Dispose();
            tlog.Debug(tag, $"FlexibleViewLayoutManagerScrollVerticallyBy END (OK)");
        }