Class 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 Detail

      • MARKER_FILE_PATH

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

      • 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)