Exemplo n.º 1
0
        public void VerifyElementPartOfNestedScrollingScrollviewerAddedToList()
        {
            var root          = new XYFocusCUIElement();
            var scrollviewer  = new ScrollViewer();
            var scrollviewerB = new ScrollViewer();

            var current   = new FocusableXYFocusCUIElement();
            var candidate = new FocusableXYFocusCUIElement();

            //TODO:MZ: This has to be done somehow (in multiple tests in this file)
            //Expect(*candidate, IsOccluded)
            //	.ReturnValue(true);

            root.AddChild(scrollviewer);
            scrollviewer.AddChild(scrollviewerB);
            scrollviewer.AddChild(candidate);

            var candidateList = FindElements(root, current, scrollviewerB, true, false);

            Assert.IsTrue(candidateList.Count == 1);
            VerifyAreEqual(candidateList[0].Element, candidate);
        }
Exemplo n.º 2
0
        public void VerifyElementParticipatingInScrollAddedToList()
        {
            var root         = new XYFocusCUIElement();
            var scrollviewer = new ScrollViewer();

            var current   = new FocusableXYFocusCUIElement();
            var candidate = new FocusableXYFocusCUIElement();

            root.AddChild(scrollviewer);
            scrollviewer.AddChild(candidate);

            var candidateList = FindElements(root, current, scrollviewer, true, false);

            Assert.IsTrue(candidateList.Count == 1);
            VerifyAreEqual(candidateList[0].Element, candidate);
        }
Exemplo n.º 3
0
        public void VerifyOccludedElementInNonActiveScrollviewerNotAddedToList()
        {
            var root          = new XYFocusCUIElement();
            var scrollviewer  = new ScrollViewer();
            var scrollviewerB = new ScrollViewer();

            var current   = new FocusableXYFocusCUIElement();
            var candidate = new FocusableXYFocusCUIElement();

            //Expect(*candidate, IsOccluded)
            //	.ReturnValue(true);

            root.AddChild(scrollviewer);
            scrollviewer.AddChild(candidate);

            var candidateList = FindElements(root, current, scrollviewerB, true, false);

            Assert.IsTrue(candidateList.Count == 0);
        }