|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.aries.unittest.fixture.ArchiveFixture
public class ArchiveFixture
Utility class for creating archive-based fixtures such as EBA archives, jar files etc.
This class provides a flow based api for defining such fixtures. For example, a simple EBA archive could
be defined as such:
ArchiveFixtures.ZipFixture zip = ArchiveFixtures.newZip()
.jar("test.jar")
.manifest()
.symbolicName("com.ibm.test")
.version("2.0.0")
.end()
.file("random.txt", "Some text")
.end();
This defines a zip archive containing a single jar file (hence no application manifest). The jar file itself has
a manifest and a text file.
To actually create the physical archive use the writeOut
method on the archive fixture.
Nested Class Summary | |
---|---|
static class |
ArchiveFixture.AbstractFixture
Abstract base class for fixtures. |
static class |
ArchiveFixture.FileFixture
Simple fixture for text files. |
static interface |
ArchiveFixture.Fixture
Base interface for every fixture. |
static class |
ArchiveFixture.IStreamFixture
|
static class |
ArchiveFixture.JarFixture
Fixture for a jar archive. |
static class |
ArchiveFixture.ManifestFixture
Fixture for (bundle) manifests. |
static class |
ArchiveFixture.ZipFixture
Base fixture for any kind of zip archive. |
Constructor Summary | |
---|---|
ArchiveFixture()
|
Method Summary | |
---|---|
static ArchiveFixture.JarFixture |
newJar()
Create a new jar file fixture |
static ArchiveFixture.ZipFixture |
newZip()
Create a new zip file fixture |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ArchiveFixture()
Method Detail |
---|
public static ArchiveFixture.ZipFixture newZip()
public static ArchiveFixture.JarFixture newJar()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |