Example usage for org.apache.poi.hssf.record DConRefRecord getDataSize

List of usage examples for org.apache.poi.hssf.record DConRefRecord getDataSize

Introduction

In this page you can find the example usage for org.apache.poi.hssf.record DConRefRecord getDataSize.

Prototype

@Override
    protected int getDataSize() 

Source Link

Usage

From source file:org.ddt.listener.records.DConRefRecordTest.java

License:Apache License

/**
 * Test of getDataSize method, of class DConRefRecord.
 *///w  ww .  j av a 2 s. c  o m
@Test
public void testGetDataSize() {
    DConRefRecord instance = new DConRefRecord(TestcaseRecordInputStream.create(81, data1));
    int expResult = data1.length;
    int result = instance.getDataSize();
    assertEquals("single byte external reference, volume type path data size", expResult, result);
    instance = new DConRefRecord(TestcaseRecordInputStream.create(81, data2));
    assertEquals("double byte self reference data size", data2.length, instance.getDataSize());
    instance = new DConRefRecord(TestcaseRecordInputStream.create(81, data3));
    assertEquals("single byte self reference data size", data3.length, instance.getDataSize());
    instance = new DConRefRecord(TestcaseRecordInputStream.create(81, data4));
    assertEquals("double byte external reference, UNC volume type path data size", data4.length,
            instance.getDataSize());
}