Class TestData<Data>

    • Field Detail

      • currentUser

        protected UserModel currentUser
        This is the currentUser that we will use for creating specific test data If none specified we will use the admin user defined in default.properties
      • tasProperties

        @Autowired
        protected TasProperties tasProperties
      • PASSWORD

        public static java.lang.String PASSWORD
      • EMAIL

        public static java.lang.String EMAIL
    • Constructor Detail

      • TestData

        public TestData()
    • Method Detail

      • isAFile

        public static boolean isAFile​(java.lang.String filename)
        Check if passed as parameter is a file or not based on extension
      • usingUser

        public Data usingUser​(UserModel user)
        Call this method if you want to use another user rather than admin defined in TasProperties properties file
        Specified by:
        usingUser in interface DSL<Data>
        Parameters:
        user -
        Returns:
      • usingAdmin

        public Data usingAdmin()
        Description copied from interface: DSL
        Defines the current user to be Admin
        Specified by:
        usingAdmin in interface DSL<Data>
        Returns:
      • getAdminUser

        public UserModel getAdminUser()
      • getCurrentUser

        public UserModel getCurrentUser()
        Description copied from interface: DSL
        gets the current test user
        Specified by:
        getCurrentUser in interface DSL<Data>
        Returns:
      • usingRoot

        public Data usingRoot()
                       throws java.lang.Exception
        Specified by:
        usingRoot in interface DSL<Data>
        Returns:
        the rootPath
        Throws:
        java.lang.Exception
      • getCurrentSpace

        public java.lang.String getCurrentSpace()
        Specified by:
        getCurrentSpace in interface DSL<Data>
        Returns:
        the current Repository Space
      • usingResource

        public Data usingResource​(ContentModel model)
                           throws java.lang.Exception
        Resource can be a folder, file where we want to create new content or make assertion. The resource is the current object tested in your test
        Specified by:
        usingResource in interface DSL<Data>
        Returns:
        Throws:
        java.lang.Exception
      • usingSite

        public Data usingSite​(java.lang.String siteId)
                       throws java.lang.Exception
        Description copied from interface: DSL
        Defines the current test site to be used
        Specified by:
        usingSite in interface DSL<Data>
        Returns:
        Throws:
        java.lang.Exception
      • usingSite

        public Data usingSite​(SiteModel siteModel)
                       throws java.lang.Exception
        Description copied from interface: DSL
        Defines the current test site to be used based on SiteModel
        Specified by:
        usingSite in interface DSL<Data>
        Returns:
        Throws:
        java.lang.Exception
      • usingUserHome

        public Data usingUserHome​(java.lang.String username)
                           throws java.lang.Exception
        Description copied from interface: DSL
        Defines the current User Home to be used Example: /User Homes/
        Specified by:
        usingUserHome in interface DSL<Data>
        Returns:
        Throws:
        java.lang.Exception
      • getCurrentSite

        public java.lang.String getCurrentSite()
      • setCurrentSite

        public void setCurrentSite​(java.lang.String currentSite)
      • getLastResource

        public java.lang.String getLastResource()
      • setLastResource

        public Data setLastResource​(java.lang.String lastResource)
        Set last resource with content protocol location
        Parameters:
        lastResource -
      • setCurrentUser

        public void setCurrentUser​(UserModel testUser)
      • usingLastServerLogLines

        public Data usingLastServerLogLines​(int lineNumber)
                                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • assertLogLineIs

        public Data assertLogLineIs​(java.lang.String logLine)
                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • assertExtensionAmpExists

        public void assertExtensionAmpExists​(java.lang.String moduleId)
                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getAlfrescoHome

        public java.lang.String getAlfrescoHome()
                                         throws java.lang.Exception
        Returns Alfresco Content Services Home (Alfresco root) directory using JMX property
        Returns:
        Alfresco Content Services Home (Alfresco root) directory
        Throws:
        java.lang.Exception
      • withJMX

        public DSLJmx withJMX()
        Returns:
        JMX DSL for this wrapper