コード例 #1
0
 /**
  * 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));
 }
コード例 #2
0
 /**
  * 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));
 }