/** * value. * * @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)); }
/** * value - invalid type. * * @throws Exception if occur */ @Test(expected = ExcelRuleExtractor.FormatException.class) public void extractValueCondition_invalid() throws Exception { ExcelRuleExtractor extractor = new DefaultExcelRuleExtractor(); Sheet sheet = sheet("value.xls"); extractor.extractValueCondition(sheet.getRow(12)); }