org.silverpeas.attachment.web
Class SimpleDocumentResourceTest

java.lang.Object
  extended by com.sun.jersey.test.framework.JerseyTest
      extended by com.silverpeas.web.RESTWebServiceTest<T>
          extended by com.silverpeas.web.ResourceGettingTest<SimpleDocumentTestResource>
              extended by org.silverpeas.attachment.web.SimpleDocumentResourceTest
All Implemented Interfaces:
WebResourceTesting

public class SimpleDocumentResourceTest
extends ResourceGettingTest<SimpleDocumentTestResource>

Author:
ehugonnet

Field Summary
 
Fields inherited from class com.silverpeas.web.RESTWebServiceTest
CONTEXT_NAME
 
Fields inherited from interface com.silverpeas.web.WebResourceTesting
HTTP_SESSIONKEY
 
Constructor Summary
SimpleDocumentResourceTest()
           
 
Method Summary
 String anUnexistingResourceURI()
           
<T> T
aResource()
           
 String aResourceURI()
           
 String[] getExistingComponentInstances()
           
 String getSessionKey()
           
 void gettingAResourceByAnUnauthorizedUser()
           
 Class<?> getWebEntityClass()
           
 void prepareTestResources()
           
 void testCleanUp()
           
 void testGetDocument()
          Test of getDocument method, of class SimpleDocumentRessource.
 void testGetDocumentTanslations()
          Test of getDocumentTanslations method, of class SimpleDocumentRessource.
 void testGetFileContent()
          Test of getFileContent method, of class SimpleDocumentRessource.
 void testLockDocument()
           
 void testLockDocumentWrongContentLanguage()
           
 void testSwitchDocumentVersionState()
           
 void testSwitchDownloadAllowedForReaders()
           
 void testUnlockDocument()
           
 void testUpdateDocumentWithContent()
           
 void testUpdateDocumentWithoutContent()
           
 
Methods inherited from class com.silverpeas.web.ResourceGettingTest
asMediaType, getAt, getAt, gettingAnUnexistingResource, gettingAResourceByANonAuthenticatedUser, gettingAResourceWithAnExpiredSession, withAsSessionKey
 
Methods inherited from class com.silverpeas.web.RESTWebServiceTest
addComponentInstance, addTool, aUser, authenticate, buildQueryParametersFrom, denieAuthorizationToUsers, denieSpaceAuthorizationToUsers, getAccessControllerMock, getExistingTools, getMockedSpaceAccessController, getOrganizationControllerMock, getPersonalizationServiceMock, getTestResources, prepareMockedResources, resource, setComponentAccessibilityToUser
 
Methods inherited from class com.sun.jersey.test.framework.JerseyTest
client, configure, getBaseURI, getClient, getClientFactory, getPort, getTestContainerFactory, setClientFactory, setTestContainerFactory, setUp, tearDown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleDocumentResourceTest

public SimpleDocumentResourceTest()
Method Detail

testCleanUp

public void testCleanUp()
                 throws Exception
Throws:
Exception

prepareTestResources

public void prepareTestResources()

gettingAResourceByAnUnauthorizedUser

public void gettingAResourceByAnUnauthorizedUser()
Overrides:
gettingAResourceByAnUnauthorizedUser in class ResourceGettingTest<SimpleDocumentTestResource>

testGetDocument

public void testGetDocument()
Test of getDocument method, of class SimpleDocumentRessource.


testGetDocumentTanslations

public void testGetDocumentTanslations()
Test of getDocumentTanslations method, of class SimpleDocumentRessource.


testGetFileContent

public void testGetFileContent()
Test of getFileContent method, of class SimpleDocumentRessource.


testUpdateDocumentWithContent

public void testUpdateDocumentWithContent()

testUpdateDocumentWithoutContent

public void testUpdateDocumentWithoutContent()

testLockDocument

public void testLockDocument()

testLockDocumentWrongContentLanguage

public void testLockDocumentWrongContentLanguage()

testUnlockDocument

public void testUnlockDocument()

testSwitchDocumentVersionState

public void testSwitchDocumentVersionState()

testSwitchDownloadAllowedForReaders

public void testSwitchDownloadAllowedForReaders()

getExistingComponentInstances

public String[] getExistingComponentInstances()
Specified by:
getExistingComponentInstances in class RESTWebServiceTest<SimpleDocumentTestResource>

aResourceURI

public String aResourceURI()

anUnexistingResourceURI

public String anUnexistingResourceURI()

aResource

public <T> T aResource()

getSessionKey

public String getSessionKey()

getWebEntityClass

public Class<?> getWebEntityClass()


Copyright © 2016 Silverpeas. All Rights Reserved.