Package org.apache.poi.ss.usermodel

Examples of org.apache.poi.ss.usermodel.Sheet


     * @throws Exception if occur
     */
    @Test
    public void extractDataModelCondition_strict() throws Exception {
        ExcelRuleExtractor extractor = new DefaultExcelRuleExtractor();
        Sheet sheet = sheet("total_strict.xls");
        assertThat(extractor.extractDataModelCondition(sheet),
                is((Object) EnumSet.noneOf(DataModelCondition.class)));
    }
View Full Code Here


     * @throws Exception if occur
     */
    @Test
    public void extractDataModelCondition_expect() throws Exception {
        ExcelRuleExtractor extractor = new DefaultExcelRuleExtractor();
        Sheet sheet = sheet("total_expect.xls");
        assertThat(extractor.extractDataModelCondition(sheet),
                is((Object) EnumSet.of(DataModelCondition.IGNORE_UNEXPECTED)));
    }
View Full Code Here

     * @throws Exception if occur
     */
    @Test
    public void extractDataModelCondition_actual() throws Exception {
        ExcelRuleExtractor extractor = new DefaultExcelRuleExtractor();
        Sheet sheet = sheet("total_actual.xls");
        assertThat(extractor.extractDataModelCondition(sheet),
                is((Object) EnumSet.of(DataModelCondition.IGNORE_ABSENT)));
    }
View Full Code Here

     * @throws Exception if occur
     */
    @Test
    public void extractDataModelCondition_intersect() throws Exception {
        ExcelRuleExtractor extractor = new DefaultExcelRuleExtractor();
        Sheet sheet = sheet("total_intersect.xls");
        assertThat(extractor.extractDataModelCondition(sheet),
                is((Object) EnumSet.of(DataModelCondition.IGNORE_UNEXPECTED,
                        DataModelCondition.IGNORE_ABSENT)));
    }
View Full Code Here

     * @throws Exception if occur
     */
    @Test
    public void extractDataModelCondition_skip() throws Exception {
        ExcelRuleExtractor extractor = new DefaultExcelRuleExtractor();
        Sheet sheet = sheet("total_skip.xls");
        assertThat(extractor.extractDataModelCondition(sheet),
                is((Object) EnumSet.allOf(DataModelCondition.class)));
    }
View Full Code Here

     * @throws Exception if occur
     */
    @Test
    public void extractPropertyRowStartIndex() throws Exception {
        ExcelRuleExtractor extractor = new DefaultExcelRuleExtractor();
        Sheet sheet = sheet("simple.xls");
        assertThat(extractor.extractPropertyRowStartIndex(sheet), is(3));
    }
View Full Code Here

     * @throws Exception if occur
     */
    @Test
    public void extractName() throws Exception {
        ExcelRuleExtractor extractor = new DefaultExcelRuleExtractor();
        Sheet sheet = sheet("name.xls");
        assertThat(extractor.extractName(sheet.getRow(3)), is("value"));
        assertThat(extractor.extractName(sheet.getRow(4)), is("a"));
        assertThat(extractor.extractName(sheet.getRow(5)), is("very_long_name"));
    }
View Full Code Here

     * @throws Exception if occur
     */
    @Test
    public void extractName_empty() throws Exception {
        ExcelRuleExtractor extractor = new DefaultExcelRuleExtractor();
        Sheet sheet = sheet("name.xls");
        assertThat(extractor.extractName(sheet.getRow(6)), is(nullValue()));
    }
View Full Code Here

     * @throws Exception if occur
     */
    @Test
    public void extractName_blank() throws Exception {
        ExcelRuleExtractor extractor = new DefaultExcelRuleExtractor();
        Sheet sheet = sheet("name.xls");
        assertThat(extractor.extractName(sheet.getRow(7)), is(nullValue()));
    }
View Full Code Here

     * @throws Exception if occur
     */
    @Test
    public void extractValueCondition() throws Exception {
        ExcelRuleExtractor extractor = new DefaultExcelRuleExtractor();
        Sheet sheet = sheet("value.xls");
        assertThat(extractor.extractValueCondition(sheet.getRow(3)), is(ValueConditionKind.ANY));
        assertThat(extractor.extractValueCondition(sheet.getRow(4)), is(ValueConditionKind.KEY));
        assertThat(extractor.extractValueCondition(sheet.getRow(5)), is(ValueConditionKind.EQUAL));
        assertThat(extractor.extractValueCondition(sheet.getRow(6)), is(ValueConditionKind.CONTAIN));
        assertThat(extractor.extractValueCondition(sheet.getRow(7)), is(ValueConditionKind.TODAY));
        assertThat(extractor.extractValueCondition(sheet.getRow(8)), is(ValueConditionKind.NOW));
    }
View Full Code Here

TOP

Related Classes of org.apache.poi.ss.usermodel.Sheet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.