Class TestUtils


  • public class TestUtils
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      TestUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T extends com.xebialabs.deployit.plugin.api.udm.artifact.SourceArtifact>
      T
      createArtifact​(java.lang.String name, java.lang.String version, java.lang.String classpathResource, java.lang.String type, java.io.File workingFolder)  
      static <T extends com.xebialabs.deployit.plugin.api.udm.artifact.SourceArtifact>
      T
      createArtifactWithoutCopy​(java.lang.String name, java.lang.String version, java.lang.String classpathResource, java.lang.String type, java.io.File workingFolder)  
      static com.xebialabs.deployit.plugin.api.udm.DeploymentPackage createDeploymentPackage​(com.xebialabs.deployit.plugin.api.udm.Deployable... deployables)  
      static com.xebialabs.deployit.plugin.api.udm.DeploymentPackage createDeploymentPackage​(java.lang.String version, com.xebialabs.deployit.plugin.api.udm.Deployable... deployables)  
      static com.xebialabs.deployit.plugin.api.udm.Environment createEnvironment​(com.xebialabs.deployit.plugin.api.udm.Container... containers)  
      static java.lang.String getTitleFromHtmlPage​(java.lang.String url)  
      static java.lang.String getTitleFromHtmlPage​(java.net.URL url)  
      static java.lang.String id​(java.lang.String... names)  
      static <T> T newInstance​(com.xebialabs.deployit.plugin.api.reflect.Type type, java.lang.String id)  
      static <T> T newInstance​(java.lang.Class<T> clazz)  
      static <T extends com.xebialabs.deployit.plugin.api.udm.ConfigurationItem>
      T
      newInstance​(java.lang.Class<T> clazz, java.lang.String id)
      Creates new CI instance and sets id
      static <T> T newInstance​(java.lang.String type)  
      static <T extends com.xebialabs.deployit.plugin.api.udm.ConfigurationItem>
      T
      newInstance​(java.lang.String type, java.lang.String id)
      Creates new CI instance and sets id
      static java.lang.String readResource​(java.lang.String resource)
      Returns resource content as a string
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TestUtils

        public TestUtils()
    • Method Detail

      • readResource

        public static java.lang.String readResource​(java.lang.String resource)
                                             throws java.io.IOException
        Returns resource content as a string
        Throws:
        java.io.IOException
      • newInstance

        public static <T> T newInstance​(java.lang.String type)
      • newInstance

        public static <T> T newInstance​(java.lang.Class<T> clazz)
      • newInstance

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

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

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

        public static java.lang.String id​(java.lang.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​(java.lang.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​(java.lang.String name,
                                                                                                                 java.lang.String version,
                                                                                                                 java.lang.String classpathResource,
                                                                                                                 java.lang.String type,
                                                                                                                 java.io.File workingFolder)
                                                                                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • createArtifactWithoutCopy

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

        public static java.lang.String getTitleFromHtmlPage​(java.lang.String url)
                                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • getTitleFromHtmlPage

        public static java.lang.String getTitleFromHtmlPage​(java.net.URL url)
                                                     throws java.io.IOException
        Throws:
        java.io.IOException