Package org.alfresco.rest.demo
Class RestDemoTests
- java.lang.Object
-
- org.springframework.test.context.testng.AbstractTestNGSpringContextTests
-
- org.alfresco.rest.RestTest
-
- org.alfresco.rest.demo.RestDemoTests
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.testng.IHookable,org.testng.ITestNGListener
public class RestDemoTests extends RestTest
-
-
Field Summary
-
Fields inherited from class org.alfresco.rest.RestTest
dataContent, dataGroup, dataLink, dataSite, dataUser, dataWorkflow, properties, restClient, restProperties, serverHealth, testSite, workflow
-
-
Constructor Summary
Constructors Constructor Description RestDemoTests()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadminCanAddAndUpdateSiteMemberDetails()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 callvoidadminCanPostAndUpdateComments()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 updatedvoidadminRetrievesCorrectSiteDetails()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 correctvoiddataPreparation()-
Methods inherited from class org.alfresco.rest.RestTest
checkServerHealth, showEndTestInfo, showStartTestInfo
-
Methods inherited from class org.springframework.test.context.testng.AbstractTestNGSpringContextTests
run, setApplicationContext, springTestContextAfterTestClass, springTestContextAfterTestMethod, springTestContextBeforeTestClass, springTestContextBeforeTestMethod, springTestContextPrepareTestInstance
-
-
-
-
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.ExceptionData 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:
JsonToModelConversionExceptionjava.lang.Exception
-
adminCanPostAndUpdateComments
public void adminCanPostAndUpdateComments() throws java.lang.ExceptionData 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.ExceptionData 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.DataPreparationExceptionJsonToModelConversionExceptionjava.lang.Exception
-
-