Example usage for org.apache.poi.ss.usermodel Sheet getRow

List of usage examples for org.apache.poi.ss.usermodel Sheet getRow

Introduction

In this page you can find the example usage for org.apache.poi.ss.usermodel Sheet getRow.

Prototype

Row getRow(int rownum);

Source Link

Document

Returns the logical row (not physical) 0-based.

Usage

From source file:com.asakusafw.testdriver.excel.legacy.LegacyExcelRuleExtractorTest.java

License:Apache License

/**
 * value conditions - unknown value./*  w  w  w  .j  a va  2  s . c  om*/
 * @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));
}

From source file:com.asakusafw.testdriver.excel.legacy.LegacyExcelRuleExtractorTest.java

License:Apache License

/**
 * value conditions - blank value./*w w w .  j  a  v a  2 s  .co  m*/
 * @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));
}

From source file:com.asakusafw.testdriver.excel.legacy.LegacyExcelRuleExtractorTest.java

License:Apache License

/**
 * value conditions - invalid type.//  ww w.j a v  a 2 s . c  o m
 * @throws Exception if failed
 */
@Test(expected = ExcelRuleExtractor.FormatException.class)
public void extractValueCondition_invalid_type() throws Exception {
    ExcelRuleExtractor extractor = new LegacyExcelRuleExtractor();
    Sheet sheet = sheet("invalid.xls");
    extractor.extractValueCondition(sheet.getRow(5));
}

From source file:com.asakusafw.testdriver.excel.legacy.LegacyExcelRuleExtractorTest.java

License:Apache License

/**
 * key.// ww w .ja va2 s .  c om
 * @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));
}

From source file:com.asakusafw.testdriver.excel.legacy.LegacyExcelRuleExtractorTest.java

License:Apache License

/**
 * key - invalid type./*from   w  w w.  j ava 2  s .  co m*/
 * @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));
}

From source file:com.asakusafw.testdriver.excel.legacy.LegacyExcelRuleExtractorTest.java

License:Apache License

/**
 * key - unknown./*w w  w.j  a  va  2  s.c  o m*/
 * @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));
}

From source file:com.asakusafw.testdriver.excel.legacy.LegacyExcelRuleExtractorTest.java

License:Apache License

/**
 * nullity conditions./*from  w w  w . ja v a 2s . c  o m*/
 * @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));
}

From source file:com.asakusafw.testdriver.excel.legacy.LegacyExcelRuleExtractorTest.java

License:Apache License

/**
 * nullity conditions - unknown./*from ww w.  jav  a 2s.c om*/
 * @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));
}

From source file:com.asakusafw.testdriver.excel.legacy.LegacyExcelRuleExtractorTest.java

License:Apache License

/**
 * nullity conditions - blank.//from ww  w.  j  a v a2 s . c  o m
 * @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));
}

From source file:com.asakusafw.testdriver.excel.legacy.LegacyExcelRuleExtractorTest.java

License:Apache License

/**
 * nullity conditions - invalid type.//from   ww w .jav a2s  . c  om
 * @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));
}