Skip to content

Commit

Permalink
[SHRINKWRAP-259] Allow ShrinkWrap.create(ZipImporter.class) w/ defaul…
Browse files Browse the repository at this point in the history
…t .jar extension in the name
  • Loading branch information
Andrew Lee Rubinger committed Mar 15, 2011
1 parent a535133 commit 4cdd13b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
implementingClassName=org.jboss.shrinkwrap.impl.base.importer.zip.ZipImporterImpl
implementingClassName=org.jboss.shrinkwrap.impl.base.importer.zip.ZipImporterImpl
extension=.jar
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;

import org.jboss.shrinkwrap.api.GenericArchive;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.exporter.StreamExporter;
import org.jboss.shrinkwrap.api.exporter.ZipExporter;
import org.jboss.shrinkwrap.api.importer.ArchiveImportException;
import org.jboss.shrinkwrap.api.importer.ZipImporter;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.junit.Assert;
import org.junit.Test;

/**
Expand Down Expand Up @@ -133,4 +135,18 @@ public int read() throws IOException
}
};
}

//-------------------------------------------------------------------------------------||
// Tests ------------------------------------------------------------------------------||
//-------------------------------------------------------------------------------------||

/**
* SHRINKWRAP-259
*/
@Test
public void createZipImporter()
{
final GenericArchive importer = ShrinkWrap.create(ZipImporter.class).as(GenericArchive.class);
Assert.assertTrue("Archive did not have expected suffix", importer.getName().endsWith(".jar"));
}
}

0 comments on commit 4cdd13b

Please sign in to comment.