Package com.asakusafw.testdriver.excel

Examples of com.asakusafw.testdriver.excel.ExcelRuleExtractor$FormatException


     * key.
     * @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


     * key - invalid type.
     * @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

     * key - unknown.
     * @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

     * nullity conditions.
     * @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

     * nullity conditions - unknown.
     * @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

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

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

    /**
     * supported.
     */
    @Test
    public void supports() {
        ExcelRuleExtractor extractor = new LegacyExcelRuleExtractor();
        Sheet sheet = sheet("legacy-rule.xls");
        assertThat(extractor.supports(sheet), is(true));
    }
View Full Code Here

    /**
     * not supported.
     */
    @Test
    public void supports_not() {
        ExcelRuleExtractor extractor = new LegacyExcelRuleExtractor();
        Sheet sheet = sheet("invalid.xls");
        assertThat(extractor.supports(sheet), is(false));
    }
View Full Code Here

     * total condition - ignore.
     * @throws Exception if failed
     */
    @Test
    public void extractDataModelCondition_ignore() throws Exception {
        ExcelRuleExtractor extractor = new LegacyExcelRuleExtractor();
        Sheet sheet = sheet("ignore.xls");
        assertThat(extractor.extractDataModelCondition(sheet),
                is((Object) EnumSet.allOf(DataModelCondition.class)));
    }
View Full Code Here

TOP

Related Classes of com.asakusafw.testdriver.excel.ExcelRuleExtractor$FormatException

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.