com.xebialabs.deployit.test.support.utils
Class ItestUtils

java.lang.Object
  extended by com.xebialabs.deployit.test.support.utils.ItestUtils

public class ItestUtils
extends java.lang.Object


Field Summary
static java.lang.String ITEST_EAR_NAME
           
static java.lang.String ITEST_SUCCESS_MESSAGE
           
static java.lang.String ITEST_WAR_NAME
           
 
Constructor Summary
ItestUtils()
           
 
Method Summary
static void assertItestServletSucceeds(com.xebialabs.deployit.ci.Host serverHost, int port, java.lang.Class<? extends javax.servlet.Servlet> itestServletClass)
           
static void assertItestServletSucceeds(com.xebialabs.deployit.ci.Host serverHost, int port, java.lang.Class<? extends javax.servlet.Servlet> itestServletClass, java.lang.String action)
           
static void assertStepFails(com.xebialabs.deployit.Step step)
           
static void assertStepReturns(com.xebialabs.deployit.Step step, boolean expectedReturnValue)
           
static void assertStepSucceeds(com.xebialabs.deployit.Step step)
           
static void clearStepExecutionContext()
           
static com.xebialabs.deployit.ci.artifact.Ear createItestEar(java.lang.Class<? extends javax.servlet.Servlet> itestServletClass)
          Creates an actual EAR file in a temporary location that contains a servlet of the given class, mapped to the context root given by ITEST_WAR_NAME.
static com.xebialabs.deployit.ci.artifact.War createItestWar(java.lang.Class<? extends javax.servlet.Servlet> itestServletClass)
           
static com.xebialabs.deployit.StepExecutionContext getDebugStepExecutionContext()
           
static java.io.File resourceToFile(org.springframework.core.io.Resource resource)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ITEST_EAR_NAME

public static final java.lang.String ITEST_EAR_NAME
See Also:
Constant Field Values

ITEST_WAR_NAME

public static final java.lang.String ITEST_WAR_NAME
See Also:
Constant Field Values

ITEST_SUCCESS_MESSAGE

public static final java.lang.String ITEST_SUCCESS_MESSAGE
See Also:
Constant Field Values
Constructor Detail

ItestUtils

public ItestUtils()
Method Detail

resourceToFile

public static java.io.File resourceToFile(org.springframework.core.io.Resource resource)
                                   throws java.io.IOException
Throws:
java.io.IOException

createItestEar

public static com.xebialabs.deployit.ci.artifact.Ear createItestEar(java.lang.Class<? extends javax.servlet.Servlet> itestServletClass)
                                                             throws java.io.IOException
Creates an actual EAR file in a temporary location that contains a servlet of the given class, mapped to the context root given by ITEST_WAR_NAME.

Returns an Ear CI whose backing file is the EAR file created.

Parameters:
itestServletClass - the class of the servlet to be deployed
Returns:
an Ear CI representing the created EAR file
Throws:
java.io.IOException - if the EAR file could not be written

createItestWar

public static com.xebialabs.deployit.ci.artifact.War createItestWar(java.lang.Class<? extends javax.servlet.Servlet> itestServletClass)
                                                             throws java.io.IOException
Throws:
java.io.IOException

assertItestServletSucceeds

public static void assertItestServletSucceeds(com.xebialabs.deployit.ci.Host serverHost,
                                              int port,
                                              java.lang.Class<? extends javax.servlet.Servlet> itestServletClass)
                                       throws java.io.IOException,
                                              org.xml.sax.SAXException
Throws:
java.io.IOException
org.xml.sax.SAXException

assertItestServletSucceeds

public static void assertItestServletSucceeds(com.xebialabs.deployit.ci.Host serverHost,
                                              int port,
                                              java.lang.Class<? extends javax.servlet.Servlet> itestServletClass,
                                              java.lang.String action)
                                       throws java.io.IOException,
                                              org.xml.sax.SAXException
Throws:
java.io.IOException
org.xml.sax.SAXException

assertStepSucceeds

public static void assertStepSucceeds(com.xebialabs.deployit.Step step)

assertStepFails

public static void assertStepFails(com.xebialabs.deployit.Step step)

getDebugStepExecutionContext

public static com.xebialabs.deployit.StepExecutionContext getDebugStepExecutionContext()

clearStepExecutionContext

public static void clearStepExecutionContext()

assertStepReturns

public static void assertStepReturns(com.xebialabs.deployit.Step step,
                                     boolean expectedReturnValue)


Copyright © 2010. All Rights Reserved.