public void ScrollableBaseBaseRemove() { tlog.Debug(tag, $"ScrollableBaseBaseRemove START"); var testingTarget = new MyScrollableBase() { Size = new Size(2000, 200), BackgroundColor = Color.Cyan, ScrollingDirection = ScrollableBase.Direction.Horizontal, }; Assert.IsNotNull(testingTarget, "null handle"); Assert.IsInstanceOf <ScrollableBase>(testingTarget, "Should return ScrollableBase instance."); using (View view = new View() { Size = new Size(100, 200), }) { testingTarget.Add(view); try { testingTarget.BaseRemove(view); } catch (Exception e) { tlog.Debug(tag, e.Message.ToString()); Assert.Fail("Caught Exception : Failed!"); } } testingTarget.Dispose(); tlog.Debug(tag, $"ScrollableBaseBaseRemove END (OK)"); }
public void ScrollableBaseDecelerating() { tlog.Debug(tag, $"ScrollableBaseDecelerating START"); var testingTarget = new MyScrollableBase() { Size = new Size(100, 2), BackgroundColor = Color.Cyan, ScrollingDirection = ScrollableBase.Direction.Vertical, }; Assert.IsNotNull(testingTarget, "null handle"); Assert.IsInstanceOf <ScrollableBase>(testingTarget, "Should return ScrollableBase instance."); try { using (Animation ani = new Animation(300)) { ani.DefaultAlphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Bounce); testingTarget.MyDecelerating(0.3f, ani); } } catch (Exception e) { tlog.Debug(tag, e.Message.ToString()); Assert.Fail("Caught Exception : Failed!"); } testingTarget.Dispose(); tlog.Debug(tag, $"ScrollableBaseDecelerating END (OK)"); }
public void ScrollableBaseGetNextFocusableView() { tlog.Debug(tag, $"ScrollableBaseGetNextFocusableView START"); var testingTarget = new MyScrollableBase(); Assert.IsNotNull(testingTarget, "null handle"); Assert.IsInstanceOf <ScrollableBase>(testingTarget, "Should return ScrollableBase instance."); View view1 = new View() { Size = new Size(100, 200), Position = new Position(0, 0), BackgroundColor = Color.Cyan }; View view2 = new View() { Size = new Size(100, 200), Position = new Position(150, 0), BackgroundColor = Color.Green }; View view3 = new View() { Size = new Size(100, 200), Position = new Position(300, 200), BackgroundColor = Color.Green }; FocusManager.Instance.SetCurrentFocusView(view1); try { testingTarget.OnGetNextFocusableView(view1, View.FocusDirection.Right, true); testingTarget.OnGetNextFocusableView(view2, View.FocusDirection.Right, true); testingTarget.OnGetNextFocusableView(view3, View.FocusDirection.Left, true); } catch (Exception e) { tlog.Debug(tag, e.Message.ToString()); Assert.Fail("Caught Exception : Failed!"); } FocusManager.Instance.ClearFocus(); testingTarget.Dispose(); tlog.Debug(tag, $"ScrollableBaseGetNextFocusableView END (OK)"); }
public void ScrollableBaseAccessibilityScrollToChild() { tlog.Debug(tag, $"ScrollableBaseAccessibilityScrollToChild START"); var testingTarget = new MyScrollableBase() { Size = new Size(2000, 200), BackgroundColor = Color.Cyan, ScrollingDirection = ScrollableBase.Direction.Horizontal, }; Assert.IsNotNull(testingTarget, "null handle"); Assert.IsInstanceOf <ScrollableBase>(testingTarget, "Should return ScrollableBase instance."); testingTarget.ScrollAlphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseIn); tlog.Debug(tag, "ScrollAlphaFunction : " + testingTarget.ScrollAlphaFunction); View[] views = new View[10]; for (int i = 0; i < 10; i++) { views[i] = new View(); views[i].Size = new Size(200, 200); testingTarget.Add(views[i]); } var result = testingTarget.MyAccessibilityScrollToChild(views[9]); tlog.Debug(tag, "AccessibilityScrollToChild : " + result); try { testingTarget.RemoveAllChildren(true); } catch (Exception e) { tlog.Debug(tag, e.Message.ToString()); Assert.Fail("Caught Exception : Failed!"); } testingTarget.Dispose(); tlog.Debug(tag, $"ScrollableBaseAccessibilityScrollToChild END (OK)"); }
public void ScrollableBaseEnableOverShootingEffect() { tlog.Debug(tag, $"ScrollableBaseEnableOverShootingEffect START"); var testingTarget = new MyScrollableBase() { Size = new Size(2000, 200), BackgroundColor = Color.Cyan, ScrollingDirection = ScrollableBase.Direction.Horizontal, }; Assert.IsNotNull(testingTarget, "null handle"); Assert.IsInstanceOf <ScrollableBase>(testingTarget, "Should return ScrollableBase instance."); testingTarget.EnableOverShootingEffect = true; tlog.Debug(tag, "EnableOverShootingEffect : " + testingTarget.EnableOverShootingEffect); testingTarget.Dispose(); tlog.Debug(tag, $"ScrollableBaseEnableOverShootingEffect END (OK)"); }
public void ScrollableBaseScrollAlphaFunction() { tlog.Debug(tag, $"ScrollableBaseScrollAlphaFunction START"); var testingTarget = new MyScrollableBase() { Size = new Size(100, 2), BackgroundColor = Color.Cyan, ScrollingDirection = ScrollableBase.Direction.Vertical, }; Assert.IsNotNull(testingTarget, "null handle"); Assert.IsInstanceOf <ScrollableBase>(testingTarget, "Should return ScrollableBase instance."); testingTarget.ScrollAlphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseIn); tlog.Debug(tag, "ScrollAlphaFunction : " + testingTarget.ScrollAlphaFunction); testingTarget.Dispose(); tlog.Debug(tag, $"ScrollableBaseScrollAlphaFunction END (OK)"); }
public void ScrollableBaseDecelerationThreshold() { tlog.Debug(tag, $"ScrollableBaseDecelerationThreshold START"); var testingTarget = new MyScrollableBase() { Size = new Size(100, 2), BackgroundColor = Color.Cyan, ScrollingDirection = ScrollableBase.Direction.Vertical, }; Assert.IsNotNull(testingTarget, "null handle"); Assert.IsInstanceOf <ScrollableBase>(testingTarget, "Should return ScrollableBase instance."); testingTarget.DecelerationThreshold = 0.8f; tlog.Debug(tag, "DecelerationThreshold : " + testingTarget.DecelerationThreshold); testingTarget.Dispose(); tlog.Debug(tag, $"ScrollableBaseDecelerationThreshold END (OK)"); }
public void ScrollableBaseAccessibilityIsScrollable() { tlog.Debug(tag, $"ScrollableBaseAccessibilityIsScrollable START"); var testingTarget = new MyScrollableBase(); Assert.IsNotNull(testingTarget, "null handle"); Assert.IsInstanceOf <ScrollableBase>(testingTarget, "Should return ScrollableBase instance."); try { testingTarget.MyAccessibilityIsScrollable(); } catch (Exception e) { tlog.Debug(tag, e.Message.ToString()); Assert.Fail("Caught Exception : Failed!"); } testingTarget.Dispose(); tlog.Debug(tag, $"ScrollableBaseAccessibilityIsScrollable END (OK)"); }