Class Testable

java.lang.Object
org.jboss.arquillian.container.test.api.Testable

public final class Testable extends Object
When testing an ear deployment containing multiple wars using the servlet protocol this class allows to define the archive under test. This means that the test is running in the context of this web module.
Version:
$Revision: $
Author:
robert.panzer
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.jboss.shrinkwrap.api.ArchivePath
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T extends org.jboss.shrinkwrap.api.Archive<T>>
    T
    archiveToTest(T archive)
    Mark the given archive as the archive under test so that the test are running in its context when using the Servlet protocol.
    static <T extends org.jboss.shrinkwrap.api.Archive<T>>
    boolean
    isArchiveToTest(T archive)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • MARKER_FILE_PATH

      public static final org.jboss.shrinkwrap.api.ArchivePath MARKER_FILE_PATH
  • Method Details

    • archiveToTest

      public static <T extends org.jboss.shrinkwrap.api.Archive<T>> T archiveToTest(T archive)
      Mark the given archive as the archive under test so that the test are running in its context when using the Servlet protocol.

      Usage Example:

       @Deployment
       public static EnterpriseArchive create() {
          EnterpriseArchive earArchive = ...
          WebArchive warArchive = ...
          earArchive.addAsModule( Testable.archiveToTest(warArchive) );
          return earArchive;
       }
       
    • isArchiveToTest

      public static <T extends org.jboss.shrinkwrap.api.Archive<T>> boolean isArchiveToTest(T archive)