Package org.apache.poi.ss.usermodel

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


     * @throws Exception if failed
     */
    @Test(expected = ExcelRuleExtractor.FormatException.class)
    public void extractName_invalid() throws Exception {
        ExcelRuleExtractor extractor = new LegacyExcelRuleExtractor();
        Sheet sheet = sheet("invalid.xls");
        extractor.extractName(sheet.getRow(5));
    }
View Full Code Here


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

     * @throws Exception if failed
     */
    @Test(expected = ExcelRuleExtractor.FormatException.class)
    public void extractValueCondition_unknown() throws Exception {
        ExcelRuleExtractor extractor = new LegacyExcelRuleExtractor();
        Sheet sheet = sheet("invalid.xls");
        extractor.extractValueCondition(sheet.getRow(3));
    }
View Full Code Here

     * @throws Exception if failed
     */
    @Test(expected = ExcelRuleExtractor.FormatException.class)
    public void extractValueCondition_empty() throws Exception {
        ExcelRuleExtractor extractor = new LegacyExcelRuleExtractor();
        Sheet sheet = sheet("invalid.xls");
        extractor.extractValueCondition(sheet.getRow(4));
    }
View Full Code Here

     * @throws Exception if failed
     */
    @Test(expected = ExcelRuleExtractor.FormatException.class)
    public void extractValueCondition_invalid_type() throws Exception {
        ExcelRuleExtractor extractor = new LegacyExcelRuleExtractor();
        Sheet sheet = sheet("invalid.xls");
        extractor.extractValueCondition(sheet.getRow(5));
    }
View Full Code Here

     * @throws Exception if failed
     */
    @Test
    public void extractValueCondition_key() throws Exception {
        ExcelRuleExtractor extractor = new LegacyExcelRuleExtractor();
        Sheet sheet = sheet("key.xls");
        assertThat(extractor.extractValueCondition(sheet.getRow(3)), is(ValueConditionKind.KEY));
        assertThat(extractor.extractNullityCondition(sheet.getRow(3)), is(NullityConditionKind.NORMAL));
    }
View Full Code Here

     * @throws Exception if failed
     */
    @Test(expected = ExcelRuleExtractor.FormatException.class)
    public void extractValueCondition_key_invalid_type() throws Exception {
        ExcelRuleExtractor extractor = new LegacyExcelRuleExtractor();
        Sheet sheet = sheet("invalid.xls");
        extractor.extractValueCondition(sheet.getRow(6));
    }
View Full Code Here

     * @throws Exception if failed
     */
    @Test
    public void extractValueCondition_key_unknown() throws Exception {
        ExcelRuleExtractor extractor = new LegacyExcelRuleExtractor();
        Sheet sheet = sheet("invalid.xls");
        assertThat(extractor.extractValueCondition(sheet.getRow(7)), is(ValueConditionKind.KEY));
    }
View Full Code Here

     * @throws Exception if failed
     */
    @Test
    public void extractNullityCondition() throws Exception {
        ExcelRuleExtractor extractor = new LegacyExcelRuleExtractor();
        Sheet sheet = sheet("legacy-rule.xls");
        assertThat(extractor.extractNullityCondition(sheet.getRow(3)), is(NullityConditionKind.NORMAL));
        assertThat(extractor.extractNullityCondition(sheet.getRow(4)), is(NullityConditionKind.ACCEPT_ABSENT));
        assertThat(extractor.extractNullityCondition(sheet.getRow(5)), is(NullityConditionKind.DENY_ABSENT));
        assertThat(extractor.extractNullityCondition(sheet.getRow(6)), is(NullityConditionKind.ACCEPT_PRESENT));
        assertThat(extractor.extractNullityCondition(sheet.getRow(7)), is(NullityConditionKind.DENY_PRESENT));
    }
View Full Code Here

     * @throws Exception if failed
     */
    @Test(expected = ExcelRuleExtractor.FormatException.class)
    public void extractNullityCondition_unknown() throws Exception {
        ExcelRuleExtractor extractor = new LegacyExcelRuleExtractor();
        Sheet sheet = sheet("invalid.xls");
        extractor.extractNullityCondition(sheet.getRow(3));
    }
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.