当前位置: 首页>>代码示例>>Java>>正文


Java Require类代码示例

本文整理汇总了Java中com.redhat.darcy.ui.annotations.Require的典型用法代码示例。如果您正苦于以下问题:Java Require类的具体用法?Java Require怎么用?Java Require使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Require类属于com.redhat.darcy.ui.annotations包,在下文中一共展示了Require类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: shouldReturnTrueIfRequireIsSpecifiedForAListWithASingleElementLoaded

import com.redhat.darcy.ui.annotations.Require; //导入依赖的package包/类
@Test
public void shouldReturnTrueIfRequireIsSpecifiedForAListWithASingleElementLoaded() {
    class TestViewElement extends AbstractViewElement {
        @Require
        private List<Findable> findables;

        public TestViewElement() {
            super(mock(Locator.class));
            findables = new ArrayList<Findable>();
            findables.add(new NeverDisplayedElement());
        }
    }

    TestViewElement view = new TestViewElement();

    assertTrue("isPresent should return true if no specific requirement limit is specified for" +
            " for a list that has at least a single element present.", view.isPresent());
}
 
开发者ID:darcy-framework,项目名称:darcy-ui,代码行数:19,代码来源:AbstractViewElementIsPresentTest.java

示例2: shouldReturnFalseIfRequireIsSpecifiedForAListWithNoElementsLoaded

import com.redhat.darcy.ui.annotations.Require; //导入依赖的package包/类
@Test
public void shouldReturnFalseIfRequireIsSpecifiedForAListWithNoElementsLoaded() {
    class TestViewElement extends AbstractViewElement {
        @Require
        private List<Findable> findables;

        public TestViewElement() {
            super(mock(Locator.class));
            findables = new ArrayList<Findable>();
        }
    }

    TestViewElement view = new TestViewElement();

    assertFalse("isPresent should return false if a list with no elements present is specified" +
            " required with no requirement limit.", view.isPresent());

}
 
开发者ID:darcy-framework,项目名称:darcy-ui,代码行数:19,代码来源:AbstractViewElementIsPresentTest.java

示例3: shouldReturnTrueIfExactNumberOfRequiredElementsArePresent

import com.redhat.darcy.ui.annotations.Require; //导入依赖的package包/类
@Test
public void  shouldReturnTrueIfExactNumberOfRequiredElementsArePresent() {
    class TestViewElement extends AbstractViewElement {
        @Require(exactly = 5)
        List<Findable> findables;

        public TestViewElement() {
            super(mock(Locator.class));

            findables = new ArrayList<Findable>();

            while (findables.size() < 5) {
                findables.add(new NeverDisplayedElement());
            }
        }
    }

    TestViewElement element = new TestViewElement();

    assertTrue("isPresent should return true if a list with exactly as many elements as specified" +
            " are present.", element.isPresent());
}
 
开发者ID:darcy-framework,项目名称:darcy-ui,代码行数:23,代码来源:AbstractViewElementIsPresentTest.java

示例4: shouldReturnFalseIfExactNumberOfRequiredElementsAreNotPresent

import com.redhat.darcy.ui.annotations.Require; //导入依赖的package包/类
@Test
public void shouldReturnFalseIfExactNumberOfRequiredElementsAreNotPresent() {
    class TestViewElement extends AbstractViewElement {
        @Require(exactly = 5)
        List<Findable> findables;

        public TestViewElement() {
            super(mock(Locator.class));

            findables = new ArrayList<Findable>();

            while (findables.size() < 4) {
                findables.add(new NeverDisplayedElement());
            }

            findables.add(new NeverFoundElement());
        }
    }

    TestViewElement element = new TestViewElement();

    assertFalse("isPresent should return false if a list with less than exactly as many elements as specified" +
            " are present.", element.isPresent());

}
 
开发者ID:darcy-framework,项目名称:darcy-ui,代码行数:26,代码来源:AbstractViewElementIsPresentTest.java

示例5: shouldReturnTrueIfAtLeastAsManyRequiredElementsArePresent

import com.redhat.darcy.ui.annotations.Require; //导入依赖的package包/类
@Test
public void shouldReturnTrueIfAtLeastAsManyRequiredElementsArePresent() {
    class TestViewElement extends AbstractViewElement {
        @Require(atLeast = 5)
        List<Findable> findables;

        public TestViewElement() {
            super(mock(Locator.class));

            findables = new ArrayList<Findable>();

            while (findables.size() < 5) {
                findables.add(new NeverDisplayedElement());
            }

        }
    }

    TestViewElement element = new TestViewElement();

    assertTrue("isPresent should return true if at least a number of elements are present as" +
               " specified to be required.", element.isPresent());

}
 
开发者ID:darcy-framework,项目名称:darcy-ui,代码行数:25,代码来源:AbstractViewElementIsPresentTest.java

示例6: shouldReturnTrueIfAtMostAsManyRequiredElementsArePresent

import com.redhat.darcy.ui.annotations.Require; //导入依赖的package包/类
@Test
public void shouldReturnTrueIfAtMostAsManyRequiredElementsArePresent() {
    class TestViewElement extends AbstractViewElement {
        @Require(atMost = 5)
        List<Findable> findables;

        public TestViewElement() {
            super(mock(Locator.class));

            findables = new ArrayList<Findable>();

            while (findables.size() < 5) {
                findables.add(new NeverDisplayedElement());
            }

        }
    }

    TestViewElement element = new TestViewElement();

    assertTrue("isPresent should return true if at most a number of elements are present as" +
            " specified to be required.", element.isPresent());

}
 
开发者ID:darcy-framework,项目名称:darcy-ui,代码行数:25,代码来源:AbstractViewElementIsPresentTest.java

示例7: shouldReturnTrueIfRequireIsSpecifiedForAListWithASingleElementLoaded

import com.redhat.darcy.ui.annotations.Require; //导入依赖的package包/类
@Test
public void shouldReturnTrueIfRequireIsSpecifiedForAListWithASingleElementLoaded() {
    class TestViewElement extends AbstractViewElement {
        @Require
        private List<Element> elements;

        public TestViewElement() {
            super(mock(Locator.class));
            elements = new ArrayList<Element>();
            elements.add(new AlwaysDisplayedLabel());
        }
    }

    TestViewElement view = new TestViewElement();

    assertTrue("isDisplayed should return true if no specific requirement limit is specified for" +
            " for a list that has at least a single element displayed.", view.isDisplayed());
}
 
开发者ID:darcy-framework,项目名称:darcy-ui,代码行数:19,代码来源:AbstractViewElementIsDisplayedTest.java

示例8: shouldReturnFalseIfRequireIsSpecifiedForAListWithNoElementsLoaded

import com.redhat.darcy.ui.annotations.Require; //导入依赖的package包/类
@Test
public void shouldReturnFalseIfRequireIsSpecifiedForAListWithNoElementsLoaded() {
    class TestViewElement extends AbstractViewElement {
        @Require
        private List<Element> elements;

        public TestViewElement() {
            super(mock(Locator.class));
            elements = new ArrayList<Element>();
        }
    }

    TestViewElement view = new TestViewElement();

    assertFalse("isDisplayed should return false if a list with no elements displayed is specified" +
            " required with no requirement limit.", view.isDisplayed());

}
 
开发者ID:darcy-framework,项目名称:darcy-ui,代码行数:19,代码来源:AbstractViewElementIsDisplayedTest.java

示例9: shouldReturnTrueIfExactNumberOfRequiredElementsAreDisplayed

import com.redhat.darcy.ui.annotations.Require; //导入依赖的package包/类
@Test
public void  shouldReturnTrueIfExactNumberOfRequiredElementsAreDisplayed() {
    class TestViewElement extends AbstractViewElement {
        @Require(exactly = 5)
        List<Element> elements;

        public TestViewElement() {
            super(mock(Locator.class));

            elements = new ArrayList<Element>();

            while (elements.size() < 5) {
                elements.add(new AlwaysDisplayedLabel());
            }
        }
    }

    TestViewElement element = new TestViewElement();

    assertTrue("isDisplayed should return true if a list with exactly as many elements as specified" +
            " are displayed.", element.isDisplayed());
}
 
开发者ID:darcy-framework,项目名称:darcy-ui,代码行数:23,代码来源:AbstractViewElementIsDisplayedTest.java

示例10: shouldReturnFalseIfExactNumberOfRequiredElementsAreNotDisplayed

import com.redhat.darcy.ui.annotations.Require; //导入依赖的package包/类
@Test
public void shouldReturnFalseIfExactNumberOfRequiredElementsAreNotDisplayed() {
    class TestViewElement extends AbstractViewElement {
        @Require(exactly = 5)
        List<Element> elements;

        public TestViewElement() {
            super(mock(Locator.class));

            elements = new ArrayList<Element>();

            while (elements.size() < 4) {
                elements.add(new AlwaysDisplayedLabel());
            }

            elements.add(new NeverDisplayedElement());
        }
    }

    TestViewElement element = new TestViewElement();

    assertFalse("isDisplayed should return false if a list with less than exactly as many elements as specified" +
            " are displayed.", element.isDisplayed());

}
 
开发者ID:darcy-framework,项目名称:darcy-ui,代码行数:26,代码来源:AbstractViewElementIsDisplayedTest.java

示例11: shouldReturnTrueIfAtLeastAsManyRequiredElementsAreDisplayed

import com.redhat.darcy.ui.annotations.Require; //导入依赖的package包/类
@Test
public void shouldReturnTrueIfAtLeastAsManyRequiredElementsAreDisplayed() {
    class TestViewElement extends AbstractViewElement {
        @Require(atLeast = 5)
        List<Element> elements;

        public TestViewElement() {
            super(mock(Locator.class));

            elements = new ArrayList<Element>();

            while (elements.size() < 5) {
                elements.add(new AlwaysDisplayedLabel());
            }

        }
    }

    TestViewElement element = new TestViewElement();

    assertTrue("isDisplayed should return true if at least a number of elements are displayed as" +
            " specified to be required.", element.isDisplayed());

}
 
开发者ID:darcy-framework,项目名称:darcy-ui,代码行数:25,代码来源:AbstractViewElementIsDisplayedTest.java

示例12: shouldReturnTrueIfAtMostAsManyRequiredElementsAreDisplayed

import com.redhat.darcy.ui.annotations.Require; //导入依赖的package包/类
@Test
public void shouldReturnTrueIfAtMostAsManyRequiredElementsAreDisplayed() {
    class TestViewElement extends AbstractViewElement {
        @Require(atMost = 5)
        List<Element> elements;

        public TestViewElement() {
            super(mock(Locator.class));

            elements = new ArrayList<Element>();

            while (elements.size() < 5) {
                elements.add(new AlwaysDisplayedLabel());
            }

        }
    }

    TestViewElement element = new TestViewElement();

    assertTrue("isDisplayed should return true if at most a number of elements are displayed as" +
            " specified to be required.", element.isDisplayed());

}
 
开发者ID:darcy-framework,项目名称:darcy-ui,代码行数:25,代码来源:AbstractViewElementIsDisplayedTest.java

示例13: shouldReturnTrueIfRequireIsSpecifiedForAListWithASingleElementLoaded

import com.redhat.darcy.ui.annotations.Require; //导入依赖的package包/类
@Test
public void shouldReturnTrueIfRequireIsSpecifiedForAListWithASingleElementLoaded() {
    class TestView extends AbstractView {
        @Require
        private List<Element> elements;

        public TestView() {
            elements = new ArrayList<Element>();
            elements.add(new AlwaysDisplayedLabel());
        }
    }

    TestView view = new TestView();

    assertTrue("isLoaded should return true if no specific requirement limit is specified for" +
               " for a list that has at least a single element loaded.", view.isLoaded());
}
 
开发者ID:darcy-framework,项目名称:darcy-ui,代码行数:18,代码来源:AbstractViewIsLoadedTest.java

示例14: shouldReturnFalseIfRequireIsSpecifiedForAListWithNoElementsLoaded

import com.redhat.darcy.ui.annotations.Require; //导入依赖的package包/类
@Test
public void shouldReturnFalseIfRequireIsSpecifiedForAListWithNoElementsLoaded() {
    class TestView extends AbstractView {
        @Require
        private List<Element> elements;

        public TestView() {
            elements = new ArrayList<Element>();
        }
    }

    TestView view = new TestView();

    assertFalse("isLoaded should return false if a list with no elements loaded is specified" +
                " required with no requirement limit.", view.isLoaded());

}
 
开发者ID:darcy-framework,项目名称:darcy-ui,代码行数:18,代码来源:AbstractViewIsLoadedTest.java

示例15: shouldReturnTrueIfExactNumberOfElementsSpecifiedInListAreLoaded

import com.redhat.darcy.ui.annotations.Require; //导入依赖的package包/类
@Test
public void shouldReturnTrueIfExactNumberOfElementsSpecifiedInListAreLoaded() {
    class TestView extends AbstractView {
        @Require(exactly = 5)
        private List<Element> elements;

        public TestView() {
            elements = new ArrayList<Element>();

            while (elements.size() < 5) {
                elements.add(new AlwaysDisplayedLabel());
            }
        }
    }

    TestView view = new TestView();

    assertTrue("Should return true if an exact number of elements in a list are loaded.",
               view.isLoaded());
}
 
开发者ID:darcy-framework,项目名称:darcy-ui,代码行数:21,代码来源:AbstractViewIsLoadedTest.java


注:本文中的com.redhat.darcy.ui.annotations.Require类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。