Class RestDemoTests

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.testng.IHookable, org.testng.ITestNGListener

    public class RestDemoTests
    extends RestTest
    • Constructor Summary

      Constructors 
      Constructor Description
      RestDemoTests()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void adminCanAddAndUpdateSiteMemberDetails()
      Data preparation – create site and a new user
      As admin, add user as Consumer to site as a new site member using POST call
      Update site member role to Manager using PUT call
      Delete site member using DELETE call
      void adminCanPostAndUpdateComments()
      Data preparation – create site and document on server
      POST one comment to file using admin user
      Perform GET comments, check the new one is listed
      Update existing comment using PUT call, check that comment content is updated
      void adminRetrievesCorrectSiteDetails()
      Data preparation – create site with custom details
      Perform GET sites call using admin user
      Check that created site is included in response
      Perform GET site call, validate that site title, description and visibility are correct
      void dataPreparation()  
      • Methods inherited from class org.springframework.test.context.testng.AbstractTestNGSpringContextTests

        run, setApplicationContext, springTestContextAfterTestClass, springTestContextAfterTestMethod, springTestContextBeforeTestClass, springTestContextBeforeTestMethod, springTestContextPrepareTestInstance
      • Methods inherited from class java.lang.Object

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

      • RestDemoTests

        public RestDemoTests()
    • Method Detail

      • dataPreparation

        public void dataPreparation()
                             throws org.alfresco.utility.exception.DataPreparationException
        Throws:
        org.alfresco.utility.exception.DataPreparationException
      • adminRetrievesCorrectSiteDetails

        public void adminRetrievesCorrectSiteDetails()
                                              throws JsonToModelConversionException,
                                                     java.lang.Exception
        Data preparation – create site with custom details
        Perform GET sites call using admin user
        Check that created site is included in response
        Perform GET site call, validate that site title, description and visibility are correct
        Throws:
        JsonToModelConversionException
        java.lang.Exception
      • adminCanPostAndUpdateComments

        public void adminCanPostAndUpdateComments()
                                           throws java.lang.Exception
        Data preparation – create site and document on server
        POST one comment to file using admin user
        Perform GET comments, check the new one is listed
        Update existing comment using PUT call, check that comment content is updated
        Throws:
        java.lang.Exception
      • adminCanAddAndUpdateSiteMemberDetails

        public void adminCanAddAndUpdateSiteMemberDetails()
                                                   throws java.lang.Exception
        Data preparation – create site and a new user
        As admin, add user as Consumer to site as a new site member using POST call
        Update site member role to Manager using PUT call
        Delete site member using DELETE call
        Throws:
        org.alfresco.utility.exception.DataPreparationException
        JsonToModelConversionException
        java.lang.Exception