protoj.lang.internal
Class VerifyArchive

java.lang.Object
  extended by protoj.lang.internal.VerifyArchive

public final class VerifyArchive
extends java.lang.Object

Used to test correct form of a java archive file. Standard junit assertions are used if any problem is detected when the execute() method is invoked.

Author:
Ashley Williams

Constructor Summary
VerifyArchive(java.io.File archive)
          The file to be tested.
 
Method Summary
 void execute()
          Asserts that the given jar file exists and contains or does not contain resources as listed by the names parameter.
 java.util.jar.Manifest getManifest()
          After the execute() method has finished, this method can be called for further testing on the manifest, that is considered to specialized to make generic here.
 void initExcludedResources(java.lang.String... excludedResources)
          Any resources to check for exclusion.
 void initIncludedResources(java.lang.String... includedResources)
          Any resources to check for inclusion.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VerifyArchive

public VerifyArchive(java.io.File archive)
The file to be tested.

Parameters:
archive -
Method Detail

initIncludedResources

public void initIncludedResources(java.lang.String... includedResources)
Any resources to check for inclusion.

Parameters:
includedResources -

initExcludedResources

public void initExcludedResources(java.lang.String... excludedResources)
Any resources to check for exclusion.

Parameters:
excludedResources -

execute

public void execute()
Asserts that the given jar file exists and contains or does not contain resources as listed by the names parameter. The manifest is made available for custom testing, just call the getManifest() method.


getManifest

public java.util.jar.Manifest getManifest()
After the execute() method has finished, this method can be called for further testing on the manifest, that is considered to specialized to make generic here.

Returns: