From: <cry...@us...> - 2002-07-31 01:34:31
|
Update of /cvsroot/cdchamber/CDChamber/test/src/org/cdchamber/elements In directory usw-pr-cvs1:/tmp/cvs-serv6907 Added Files: CompressedFileTypeTest.java Log Message: CompressedFileTypeTest added --- NEW FILE: CompressedFileTypeTest.java --- // $Id: CompressedFileTypeTest.java,v 1.1 2002/07/31 01:34:27 crystal_y Exp $ package org.cdchamber.elements; import junit.framework.*; import org.cdchamber.parser.FileParseException; import org.cdchamber.util.DirPath; public class CompressedFileTypeTest extends TestCase { public CompressedFileTypeTest(String name) { super(name); } public void setUp() { } public void tearDown() { } public void testJarFile() { try { CompressedFileType compressFile = new CompressedFileType(DirPath.TestCaseDir + DirPath.SEP + "testcase.jar"); assertEquals(4,compressFile.getFilesCount()); } catch (FileParseException e) { fail("there should be no exception throwed out"); } // end of try-catch } public void testZipFile() { try { CompressedFileType compressFile = new CompressedFileType(DirPath.TestCaseDir + DirPath.SEP + "testcase.zip"); assertEquals(3,compressFile.getFilesCount()); } catch (FileParseException e) { fail("there should be no exception throwed out"); } // end of try-catch } public void testBadCompressFile() { try { CompressedFileType compressFile = new CompressedFileType(DirPath.TestCaseDir + DirPath.SEP + "bad.zip"); } catch (FileParseException e) { return; } // end of try-catch fail("there should be one exception throwed out"); } } |