From 0f83ba94b636ca9098b98ca81ad7e398e7a849ee Mon Sep 17 00:00:00 2001 From: Rob Greene Date: Thu, 1 Mar 2018 22:02:07 -0600 Subject: [PATCH] Noticed compile errors for unit tests, correcting. --- .../storage/DiskHelperTest.java | 50 ++++++++-------- .../storage/DiskWriterTest.java | 58 +++++++++---------- 2 files changed, 54 insertions(+), 54 deletions(-) diff --git a/src/test/java/com/webcodepro/applecommander/storage/DiskHelperTest.java b/src/test/java/com/webcodepro/applecommander/storage/DiskHelperTest.java index de15dc7..523afe3 100644 --- a/src/test/java/com/webcodepro/applecommander/storage/DiskHelperTest.java +++ b/src/test/java/com/webcodepro/applecommander/storage/DiskHelperTest.java @@ -49,7 +49,7 @@ public class DiskHelperTest extends TestCase { junit.textui.TestRunner.run(DiskHelperTest.class); } - public void testLoadDos33() throws IOException { + public void testLoadDos33() throws IOException, DiskException { FormattedDisk[] disks = showDirectory(config.getDiskDir() + "/DOS 3.3.po"); //$NON-NLS-1$ assertApplesoftFile(disks[0], "HELLO"); //$NON-NLS-1$ @@ -58,39 +58,39 @@ public class DiskHelperTest extends TestCase { assertBinaryFile(disks[0], "BOOT13"); //$NON-NLS-1$ } - public void testLoadMaster() throws IOException { + public void testLoadMaster() throws IOException, DiskException { showDirectory(config.getDiskDir() + "/MASTER.DSK"); //$NON-NLS-1$ } - public void testLoadGalacticAttack1() throws IOException { + public void testLoadGalacticAttack1() throws IOException, DiskException { showDirectory(config.getDiskDir() + "/galatt.dsk"); //$NON-NLS-1$ } - public void testLoadProdos() throws IOException { + public void testLoadProdos() throws IOException, DiskException { FormattedDisk[] disks = showDirectory(config.getDiskDir() + "/Prodos.dsk"); //$NON-NLS-1$ assertApplesoftFile(disks[0], "COPY.ME"); //$NON-NLS-1$ assertBinaryFile(disks[0], "SETTINGS"); //$NON-NLS-1$ assertBinaryFile(disks[0], "PRODOS"); //$NON-NLS-1$ } - public void testLoadMarbleMadness() throws IOException { + public void testLoadMarbleMadness() throws IOException, DiskException { showDirectory(config.getDiskDir() + "/Marble Madness (1985)(Electronic Arts).2mg"); //$NON-NLS-1$ } - public void testLoadHd1() throws IOException { + public void testLoadHd1() throws IOException, DiskException { showDirectory("C:/My Apple2/ApplePC/hd1.hdv"); //$NON-NLS-1$ } - public void testRdosBoot() throws IOException { + public void testRdosBoot() throws IOException, DiskException { showDirectory(config.getDiskDir() + "/RDOSboot.dsk"); //$NON-NLS-1$ } - public void testSsiSave() throws IOException { + public void testSsiSave() throws IOException, DiskException { showDirectory(config.getDiskDir() + "/SSIsave.dsk"); //$NON-NLS-1$ } - public void testPhan2d1() throws IOException { + public void testPhan2d1() throws IOException, DiskException { FormattedDisk[] disks = showDirectory(config.getDiskDir() + "/phan2d1.dsk"); //$NON-NLS-1$ assertApplesoftFile(disks[0], "PHANTASIE II"); //$NON-NLS-1$ @@ -99,42 +99,42 @@ public class DiskHelperTest extends TestCase { assertGraphicsFile(disks[0], "ICE DRAGON"); //$NON-NLS-1$ } - public void testPhan2d2() throws IOException { + public void testPhan2d2() throws IOException, DiskException { showDirectory(config.getDiskDir() + "/phan2d2.dsk"); //$NON-NLS-1$ } - public void testPhantasie1() throws IOException { + public void testPhantasie1() throws IOException, DiskException { showDirectory(config.getDiskDir() + "/Phantasie1.dsk"); //$NON-NLS-1$ } - public void testPhantasie2() throws IOException { + public void testPhantasie2() throws IOException, DiskException { showDirectory(config.getDiskDir() + "/Phantasie2.dsk"); //$NON-NLS-1$ } - public void testCavernsOfFreitag() throws IOException { + public void testCavernsOfFreitag() throws IOException, DiskException { FormattedDisk[] disks = showDirectory(config.getDiskDir() + "/CavernsOfFreitag.dsk"); //$NON-NLS-1$ assertGraphicsFile(disks[0], "TITLE.PIC"); //$NON-NLS-1$ } - public void testUniDosD3110() throws IOException { + public void testUniDosD3110() throws IOException, DiskException { showDirectory(config.getDiskDir() + "/UniDOS/D3110.dsk"); //$NON-NLS-1$ } - public void testUniDosD3151() throws IOException { + public void testUniDosD3151() throws IOException, DiskException { showDirectory(config.getDiskDir() + "/UniDOS/D3151.dsk"); //$NON-NLS-1$ } - protected FormattedDisk[] showDirectory(String imageName) throws IOException { + protected FormattedDisk[] showDirectory(String imageName) throws IOException, DiskException { Disk disk = new Disk(imageName); FormattedDisk[] formattedDisks = disk.getFormattedDisks(); for (int i=0; i files = formattedDisk.getFiles(); if (files != null) { showFiles(files, ""); //$NON-NLS-1$ } @@ -150,11 +150,11 @@ public class DiskHelperTest extends TestCase { return formattedDisks; } - protected void showFiles(List files, String indent) { + protected void showFiles(List files, String indent) throws DiskException { for (int i=0; i data = entry.getFileColumnData(FormattedDisk.FILE_DISPLAY_NATIVE); System.out.print(indent); for (int d=0; d files = formattedDisk.getFiles(); if (files != null) { showFiles(files, "", false); //$NON-NLS-1$ } @@ -402,11 +402,11 @@ public class DiskWriterTest extends TestCase { /** * Display a list of files. */ - protected void showFiles(List files, String indent, boolean showDeleted) { + protected void showFiles(List files, String indent, boolean showDeleted) throws DiskException { for (int i=0; i data = entry.getFileColumnData(FormattedDisk.FILE_DISPLAY_NATIVE); System.out.print(indent); for (int d=0; d files = disk.getFiles(); for (int i=0; i files = disk.getFiles(); for (int i=0; i