Class TestUtils

java.lang.Object
com.xebialabs.platform.test.TestUtils

public class TestUtils extends Object
  • Constructor Details

    • TestUtils

      public TestUtils()
  • Method Details

    • readResource

      public static String readResource(String resource) throws IOException
      Returns resource content as a string
      Throws:
      IOException
    • newInstance

      public static <T> T newInstance(String type)
    • newInstance

      public static <T> T newInstance(Class<T> clazz)
    • newInstance

      public static <T> T newInstance(com.xebialabs.deployit.plugin.api.reflect.Type type, String id)
    • newInstance

      public static <T extends com.xebialabs.deployit.plugin.api.udm.ConfigurationItem> T newInstance(Class<T> clazz, String id)
      Creates new CI instance and sets id
    • newInstance

      public static <T extends com.xebialabs.deployit.plugin.api.udm.ConfigurationItem> T newInstance(String type, String id)
      Creates new CI instance and sets id
    • id

      public static String id(String... names)
    • createDeploymentPackage

      public static com.xebialabs.deployit.plugin.api.udm.DeploymentPackage createDeploymentPackage(com.xebialabs.deployit.plugin.api.udm.Deployable... deployables)
    • createDeploymentPackage

      public static com.xebialabs.deployit.plugin.api.udm.DeploymentPackage createDeploymentPackage(String version, com.xebialabs.deployit.plugin.api.udm.Deployable... deployables)
    • createEnvironment

      public static com.xebialabs.deployit.plugin.api.udm.Environment createEnvironment(com.xebialabs.deployit.plugin.api.udm.Container... containers)
    • createArtifact

      public static <T extends com.xebialabs.deployit.plugin.api.udm.artifact.SourceArtifact> T createArtifact(String name, String version, String classpathResource, String type, File workingFolder) throws IOException
      Throws:
      IOException
    • createArtifactWithoutCopy

      public static <T extends com.xebialabs.deployit.plugin.api.udm.artifact.SourceArtifact> T createArtifactWithoutCopy(String name, String version, String classpathResource, String type, File workingFolder) throws URISyntaxException
      Throws:
      URISyntaxException
    • getTitleFromHtmlPage

      public static String getTitleFromHtmlPage(String url) throws IOException
      Throws:
      IOException
    • getTitleFromHtmlPage

      public static String getTitleFromHtmlPage(URL url) throws IOException
      Throws:
      IOException