use of org.glassfish.api.deployment.archive.ReadableArchive in project Payara by payara.
the class InputJarArchiveTest method testNestedTopLevelDirEntryNames.
@Test
public void testNestedTopLevelDirEntryNames() {
try {
System.out.println("nested top-level directory entry names in InputJarArchive");
final ReadableArchive arch = getArchiveForTest();
ReadableArchive subArchive = arch.getSubArchive(NESTED_JAR_ENTRY_NAME);
final Set<String> returnedNames = new HashSet<String>(subArchive.getDirectories());
assertEquals("Returned nested top-level directories do not match expected", testJarTopLevelDirEntryNames(), returnedNames);
retireArchive(arch);
} catch (IOException ex) {
ex.printStackTrace(System.out);
fail("Error during test");
}
}
use of org.glassfish.api.deployment.archive.ReadableArchive in project Payara by payara.
the class InputJarArchiveTest method testTopLevelDirEntryNamesForInputJarArchive.
@Test
public void testTopLevelDirEntryNamesForInputJarArchive() {
try {
System.out.println("top-level directory entry names in InputJarArchive");
final ReadableArchive arch = getArchiveForTest();
final Set<String> returnedNames = new HashSet<String>(arch.getDirectories());
assertEquals("Returned top-level directories do not match expected", testJarTopLevelDirEntryNames(), returnedNames);
retireArchive(arch);
} catch (IOException ex) {
ex.printStackTrace(System.out);
fail("Error during test");
}
}
use of org.glassfish.api.deployment.archive.ReadableArchive in project Payara by payara.
the class InputJarArchiveTest method testNonDirEnryNames.
@Test
public void testNonDirEnryNames() {
try {
System.out.println("non-directory entry names in InputJarArchive");
final ReadableArchive arch = getArchiveForTest();
final Set<String> returnedNames = new HashSet<String>(setFromEnumeration(arch.entries()));
assertEquals("Returned non-directory entry names do not match expected", testStandAloneArchiveJarNonDirEntryNames(), returnedNames);
retireArchive(arch);
} catch (IOException ex) {
ex.printStackTrace(System.out);
fail("Error during test");
}
}
use of org.glassfish.api.deployment.archive.ReadableArchive in project Payara by payara.
the class FileArchiveTest method testCreateWithOlderLeftoverEntry.
@Test
public void testCreateWithOlderLeftoverEntry() throws Exception {
System.out.println("testCreateWithOlderLeftoverEntry");
final ReadableArchive instance = createWithOlderLeftoverEntry(usualEntryNames);
getListOfFilesCheckForLogRecord((FileArchive) instance, usualExpectedEntryNames);
}
use of org.glassfish.api.deployment.archive.ReadableArchive in project Payara by payara.
the class FileArchiveTest method createAndPopulateAndCheckArchive.
private void createAndPopulateAndCheckArchive(final Set<String> entryNames) throws Exception {
final ReadableArchive instance = createAndPopulateArchive(entryNames);
checkArchive(instance, usualExpectedEntryNames);
}
Aggregations