com.silverpeas.pdc.web
Class PdcGettingForSearchTest

java.lang.Object
  extended by com.sun.jersey.test.framework.JerseyTest
      extended by com.silverpeas.web.RESTWebServiceTest<T>
          extended by com.silverpeas.web.ResourceGettingTest<PdcTestResources>
              extended by com.silverpeas.pdc.web.PdcGettingForSearchTest
All Implemented Interfaces:
WebResourceTesting

public class PdcGettingForSearchTest
extends ResourceGettingTest<PdcTestResources>

Unit tests on the getting of the PdC filtered by the axis and values that are effectively used in the classification of contents. This kind of filtering of the PdC is used in the advanced search.


Field Summary
 
Fields inherited from class com.silverpeas.web.RESTWebServiceTest
CONTEXT_NAME
 
Fields inherited from interface com.silverpeas.web.WebResourceTesting
HTTP_SESSIONKEY
 
Constructor Summary
PdcGettingForSearchTest()
           
 
Method Summary
 String anUnexistingResourceURI()
           
 Class<PdcEntity> aPdcEntity()
           
<T> T
aResource()
           
 String aResourceURI()
           
 String[] getExistingComponentInstances()
           
 String getSessionKey()
           
 void gettingAFilteredPdc()
           
 void gettingAFilteredPdcByAGivenComponentInstance()
           
 void gettingAFilteredPdcWithSomeSpecifiedAxisValues()
           
 void gettingAnEmptyPdcByAGivenComponentInstance()
           
 void gettingAResourceByAnUnauthorizedUser()
           
 Class<?> getWebEntityClass()
           
 void setUpUserSessionAndPdC()
           
protected  List<UsedAxis> theExpectedFilteredPdc()
           
protected  List<UsedAxis> theExpectedFilteredPdc(AxisValueCriterion... criteria)
           
protected  List<UsedAxis> theExpectedPdc()
           
protected  List<UsedAxis> theExpectedPdcFor(String contentId)
           
 PdcEntity toWebEntity(List<UsedAxis> axis, String uri)
           
protected static String withURI(String uri)
           
 
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

PdcGettingForSearchTest

public PdcGettingForSearchTest()
Method Detail

setUpUserSessionAndPdC

public void setUpUserSessionAndPdC()

gettingAResourceByAnUnauthorizedUser

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

gettingAFilteredPdc

public void gettingAFilteredPdc()
                         throws Exception
Throws:
Exception

gettingAFilteredPdcByAGivenComponentInstance

public void gettingAFilteredPdcByAGivenComponentInstance()
                                                  throws Exception
Throws:
Exception

gettingAnEmptyPdcByAGivenComponentInstance

public void gettingAnEmptyPdcByAGivenComponentInstance()
                                                throws Exception
Throws:
Exception

gettingAFilteredPdcWithSomeSpecifiedAxisValues

public void gettingAFilteredPdcWithSomeSpecifiedAxisValues()
                                                    throws Exception
Throws:
Exception

aResourceURI

public String aResourceURI()

anUnexistingResourceURI

public String anUnexistingResourceURI()

aResource

public <T> T aResource()

getSessionKey

public String getSessionKey()

getWebEntityClass

public Class<?> getWebEntityClass()

aPdcEntity

public Class<PdcEntity> aPdcEntity()

toWebEntity

public PdcEntity toWebEntity(List<UsedAxis> axis,
                             String uri)
                      throws ThesaurusException
Throws:
ThesaurusException

theExpectedPdcFor

protected List<UsedAxis> theExpectedPdcFor(String contentId)
                                    throws ContentManagerException,
                                           PdcException
Throws:
ContentManagerException
PdcException

theExpectedPdc

protected List<UsedAxis> theExpectedPdc()
                                 throws PdcException
Throws:
PdcException

theExpectedFilteredPdc

protected List<UsedAxis> theExpectedFilteredPdc()
                                         throws PdcException
Throws:
PdcException

theExpectedFilteredPdc

protected List<UsedAxis> theExpectedFilteredPdc(AxisValueCriterion... criteria)
                                         throws PdcException
Throws:
PdcException

withURI

protected static String withURI(String uri)

getExistingComponentInstances

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


Copyright © 2016 Silverpeas. All Rights Reserved.