Examples of ExcelRuleExtractor


Examples of com.asakusafw.testdriver.excel.ExcelRuleExtractor

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

Examples of com.asakusafw.testdriver.excel.ExcelRuleExtractor

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

Examples of com.asakusafw.testdriver.excel.ExcelRuleExtractor

     * total condition - invalid.
     * @throws Exception if failed
     */
    @Test(expected = ExcelRuleExtractor.FormatException.class)
    public void extractDataModelCondition_invalid() throws Exception {
        ExcelRuleExtractor extractor = new LegacyExcelRuleExtractor();
        Sheet sheet = sheet("invalid.xls");
        extractor.extractDataModelCondition(sheet);
    }
View Full Code Here

Examples of com.asakusafw.testdriver.excel.ExcelRuleExtractor

     * row start.
     * @throws Exception if failed
     */
    @Test
    public void extractPropertyRowStartIndex() throws Exception {
        ExcelRuleExtractor extractor = new LegacyExcelRuleExtractor();
        Sheet sheet = sheet("legacy-rule.xls");
        assertThat(extractor.extractPropertyRowStartIndex(sheet), is(3));
    }
View Full Code Here

Examples of com.asakusafw.testdriver.excel.ExcelRuleExtractor

     * names.
     * @throws Exception if failed
     */
    @Test
    public void extractName() throws Exception {
        ExcelRuleExtractor extractor = new LegacyExcelRuleExtractor();
        Sheet sheet = sheet("legacy-rule.xls");
        assertThat(extractor.extractName(sheet.getRow(3)), is("sid"));
        assertThat(extractor.extractName(sheet.getRow(4)), is("version_no"));
        assertThat(extractor.extractName(sheet.getRow(5)), is("rgst_datetime"));
        assertThat(extractor.extractName(sheet.getRow(6)), is("updt_datetime"));
        assertThat(extractor.extractName(sheet.getRow(7)), is("code"));
    }
View Full Code Here

Examples of com.asakusafw.testdriver.excel.ExcelRuleExtractor

     * empty names.
     * @throws Exception if failed
     */
    @Test
    public void extractName_empty() throws Exception {
        ExcelRuleExtractor extractor = new LegacyExcelRuleExtractor();
        Sheet sheet = sheet("invalid.xls");
        assertThat(extractor.extractName(sheet.getRow(3)), is(nullValue()));
        assertThat(extractor.extractName(sheet.getRow(4)), is(nullValue()));
    }
View Full Code Here

Examples of com.asakusafw.testdriver.excel.ExcelRuleExtractor

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

Examples of com.asakusafw.testdriver.excel.ExcelRuleExtractor

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

Examples of com.asakusafw.testdriver.excel.ExcelRuleExtractor

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

Examples of com.asakusafw.testdriver.excel.ExcelRuleExtractor

     * value conditions - blank value.
     * @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
TOP
Copyright © 2018 www.massapi.com. 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.