List of usage examples for org.apache.poi.ss.usermodel Sheet getRow
Row getRow(int rownum);
From source file:com.asakusafw.testdriver.excel.DefaultExcelRuleExtractorTest.java
License:Apache License
/** * name - empty string.//from ww w . j av a 2s .c o m * @throws Exception if occur */ @Test public void extractName_empty() throws Exception { ExcelRuleExtractor extractor = new DefaultExcelRuleExtractor(); Sheet sheet = sheet("name.xls"); assertThat(extractor.extractName(sheet.getRow(6)), is(nullValue())); }
From source file:com.asakusafw.testdriver.excel.DefaultExcelRuleExtractorTest.java
License:Apache License
/** * name - blank cell.//from ww w. j a v a 2s .c om * @throws Exception if occur */ @Test public void extractName_blank() throws Exception { ExcelRuleExtractor extractor = new DefaultExcelRuleExtractor(); Sheet sheet = sheet("name.xls"); assertThat(extractor.extractName(sheet.getRow(7)), is(nullValue())); }
From source file:com.asakusafw.testdriver.excel.DefaultExcelRuleExtractorTest.java
License:Apache License
/** * value.//from w ww.j av a 2s. c om * @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)); }
From source file:com.asakusafw.testdriver.excel.DefaultExcelRuleExtractorTest.java
License:Apache License
/** * @throws Exception if occur/* w ww . j a v a 2 s . c o m*/ */ @Test public void extractNullityCondition() throws Exception { ExcelRuleExtractor extractor = new DefaultExcelRuleExtractor(); Sheet sheet = sheet("nullity.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)); }
From source file:com.asakusafw.testdriver.excel.DefaultExcelRuleExtractorTest.java
License:Apache License
/** * name - invalid type.//from www . j a va 2s.c o m * @throws Exception if occur */ @Test(expected = ExcelRuleExtractor.FormatException.class) public void extractName_invalid() throws Exception { ExcelRuleExtractor extractor = new DefaultExcelRuleExtractor(); Sheet sheet = sheet("name.xls"); extractor.extractName(sheet.getRow(8)); }
From source file:com.asakusafw.testdriver.excel.DefaultExcelRuleExtractorTest.java
License:Apache License
/** * value - unknown kind./* w w w. j av a 2 s.c o m*/ * @throws Exception if occur */ @Test(expected = ExcelRuleExtractor.FormatException.class) public void extractValueCondition_unknown() throws Exception { ExcelRuleExtractor extractor = new DefaultExcelRuleExtractor(); Sheet sheet = sheet("value.xls"); extractor.extractValueCondition(sheet.getRow(9)); }
From source file:com.asakusafw.testdriver.excel.DefaultExcelRuleExtractorTest.java
License:Apache License
/** * value - empty string./*from w w w . j ava 2 s .c o m*/ * @throws Exception if occur */ @Test(expected = ExcelRuleExtractor.FormatException.class) public void extractValueCondition_empty() throws Exception { ExcelRuleExtractor extractor = new DefaultExcelRuleExtractor(); Sheet sheet = sheet("value.xls"); extractor.extractValueCondition(sheet.getRow(10)); }
From source file:com.asakusafw.testdriver.excel.DefaultExcelRuleExtractorTest.java
License:Apache License
/** * value - blank cell.//ww w. j a va 2 s. c o m * @throws Exception if occur */ @Test(expected = ExcelRuleExtractor.FormatException.class) public void extractValueCondition_blank() throws Exception { ExcelRuleExtractor extractor = new DefaultExcelRuleExtractor(); Sheet sheet = sheet("value.xls"); extractor.extractValueCondition(sheet.getRow(11)); }
From source file:com.asakusafw.testdriver.excel.DefaultExcelRuleExtractorTest.java
License:Apache License
/** * value - invalid type./*from w ww .ja va 2 s .com*/ * @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)); }
From source file:com.asakusafw.testdriver.excel.DefaultExcelRuleExtractorTest.java
License:Apache License
/** * nullity - unknown kind./*w ww.j a v a2 s. c o m*/ * @throws Exception if occur */ @Test(expected = ExcelRuleExtractor.FormatException.class) public void extractNullityCondition_unknown() throws Exception { ExcelRuleExtractor extractor = new DefaultExcelRuleExtractor(); Sheet sheet = sheet("nullity.xls"); extractor.extractNullityCondition(sheet.getRow(8)); }