Fix generics, and use base types
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1690789 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
72f0f10882
commit
6cc72aab77
@ -26,9 +26,12 @@ import junit.framework.AssertionFailedError;
|
|||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
|
|
||||||
import org.apache.poi.hssf.model.RecordStream;
|
import org.apache.poi.hssf.model.RecordStream;
|
||||||
|
import org.apache.poi.hssf.record.CFHeaderBase;
|
||||||
import org.apache.poi.hssf.record.CFHeaderRecord;
|
import org.apache.poi.hssf.record.CFHeaderRecord;
|
||||||
|
import org.apache.poi.hssf.record.CFRuleBase;
|
||||||
import org.apache.poi.hssf.record.CFRuleBase.ComparisonOperator;
|
import org.apache.poi.hssf.record.CFRuleBase.ComparisonOperator;
|
||||||
import org.apache.poi.hssf.record.CFRuleRecord;
|
import org.apache.poi.hssf.record.CFRuleRecord;
|
||||||
|
import org.apache.poi.hssf.record.Record;
|
||||||
import org.apache.poi.hssf.record.RecordFactory;
|
import org.apache.poi.hssf.record.RecordFactory;
|
||||||
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
||||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||||
@ -38,22 +41,20 @@ import org.apache.poi.util.LittleEndian;
|
|||||||
/**
|
/**
|
||||||
* Tests the serialization and deserialization of the CFRecordsAggregate
|
* Tests the serialization and deserialization of the CFRecordsAggregate
|
||||||
* class works correctly.
|
* class works correctly.
|
||||||
*
|
|
||||||
* @author Dmitriy Kumshayev
|
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("resource")
|
||||||
public final class TestCFRecordsAggregate extends TestCase
|
public final class TestCFRecordsAggregate extends TestCase
|
||||||
{
|
{
|
||||||
|
public void testCFRecordsAggregate()
|
||||||
public void testCFRecordsAggregate()
|
|
||||||
{
|
{
|
||||||
HSSFWorkbook workbook = new HSSFWorkbook();
|
HSSFWorkbook workbook = new HSSFWorkbook();
|
||||||
HSSFSheet sheet = workbook.createSheet();
|
HSSFSheet sheet = workbook.createSheet();
|
||||||
|
|
||||||
List recs = new ArrayList();
|
List<Record> recs = new ArrayList<Record>();
|
||||||
CFHeaderRecord header = new CFHeaderRecord();
|
CFHeaderBase header = new CFHeaderRecord();
|
||||||
CFRuleRecord rule1 = CFRuleRecord.create(sheet, "7");
|
CFRuleBase rule1 = CFRuleRecord.create(sheet, "7");
|
||||||
CFRuleRecord rule2 = CFRuleRecord.create(sheet, ComparisonOperator.BETWEEN, "2", "5");
|
CFRuleBase rule2 = CFRuleRecord.create(sheet, ComparisonOperator.BETWEEN, "2", "5");
|
||||||
CFRuleRecord rule3 = CFRuleRecord.create(sheet, ComparisonOperator.GE, "100", null);
|
CFRuleBase rule3 = CFRuleRecord.create(sheet, ComparisonOperator.GE, "100", null);
|
||||||
header.setNumberOfConditionalFormats(3);
|
header.setNumberOfConditionalFormats(3);
|
||||||
CellRangeAddress[] cellRanges = {
|
CellRangeAddress[] cellRanges = {
|
||||||
new CellRangeAddress(0,1,0,0),
|
new CellRangeAddress(0,1,0,0),
|
||||||
|
Loading…
Reference in New Issue
Block a user