TestMostRecentRecordspublic class TestMostRecentRecords extends TestCase Tests that SlideShow finds the right records as its most recent ones |
Fields Summary |
---|
private HSLFSlideShow | hss | private SlideShow | ss |
Constructors Summary |
---|
public TestMostRecentRecords()
String dirname = System.getProperty("HSLF.testdata.path");
String filename = dirname + "/basic_test_ppt_file.ppt";
hss = new HSLFSlideShow(filename);
ss = new SlideShow(hss);
|
Methods Summary |
---|
public void | testCorrectRecords()
// Most recent core records
Record[] mrcr = ss.getMostRecentCoreRecords();
// All records
Record[] allr = hss.getRecords();
// Ensure they are the right (latest) version of each
// Document - late version
assertEquals(allr[12], mrcr[0]);
// Notes of master - unchanged
assertEquals(allr[2], mrcr[1]);
// Master - unchanged
assertEquals(allr[1], mrcr[2]);
// Slide - added at start
assertEquals(allr[3], mrcr[3]);
// Notes - added at start
assertEquals(allr[4], mrcr[4]);
// Slide - added later and then changed
assertEquals(allr[13], mrcr[5]);
// Notes - added later but not changed
assertEquals(allr[9], mrcr[6]);
| public void | testCount()
// Most recent core records
Record[] mrcr = ss.getMostRecentCoreRecords();
// Master sheet + master notes + 2 slides + 2 notes + document
assertEquals(7, mrcr.length);
| public void | testRightRecordTypes()
// Most recent core records
Record[] mrcr = ss.getMostRecentCoreRecords();
// Document
assertEquals(1000, mrcr[0].getRecordType());
// Notes of master
assertEquals(1008, mrcr[1].getRecordType());
// Master
assertEquals(1016, mrcr[2].getRecordType());
// Slide
assertEquals(1006, mrcr[3].getRecordType());
// Notes
assertEquals(1008, mrcr[4].getRecordType());
// Slide
assertEquals(1006, mrcr[5].getRecordType());
// Notes
assertEquals(1008, mrcr[6].getRecordType());
|
|