com.silverpeas.comment.web
Class CommentCreationTest

java.lang.Object
  extended by com.sun.jersey.test.framework.JerseyTest
      extended by com.silverpeas.web.RESTWebServiceTest<T>
          extended by com.silverpeas.web.ResourceCreationTest<CommentTestResources>
              extended by com.silverpeas.comment.web.CommentCreationTest
All Implemented Interfaces:
WebResourceTesting

public class CommentCreationTest
extends ResourceCreationTest<CommentTestResources>

Unit tests on the creation of a comment through the CommentResource web service.


Field Summary
 
Fields inherited from class com.silverpeas.web.RESTWebServiceTest
CONTEXT_NAME
 
Fields inherited from interface com.silverpeas.web.WebResourceTesting
HTTP_SESSIONKEY
 
Constructor Summary
CommentCreationTest()
           
 
Method Summary
 String anUnexistingResourceURI()
           
 CommentEntity aResource()
           
 String aResourceURI()
           
 String aToolResourceURI()
           
 String[] getExistingComponentInstances()
           
 String[] getExistingTools()
           
 String getSessionKey()
           
 Class<?> getWebEntityClass()
           
 void postAnAlreadyExistingComment()
          In a such situation, the comment is created as a new one.
 void postAnAlreadyExistingCommentFromTool()
           
 void postANewComment()
           
 void postANewCommentFromTool()
           
 void postAnInvalidComment()
           
static void prepareMessagingContext()
           
 void prepareTestResources()
           
static void releaseMessagingContext()
           
 
Methods inherited from class com.silverpeas.web.ResourceCreationTest
at, creationOfANewResourceByANonAuthenticatedUser, creationOfANewResourceByANonAuthorizedUser, creationOfANewResourceWithADeprecatedSession, post, postAnInvalidResourceState
 
Methods inherited from class com.silverpeas.web.RESTWebServiceTest
addComponentInstance, addTool, aUser, authenticate, buildQueryParametersFrom, denieAuthorizationToUsers, denieSpaceAuthorizationToUsers, getAccessControllerMock, 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

CommentCreationTest

public CommentCreationTest()
Method Detail

prepareMessagingContext

public static void prepareMessagingContext()
                                    throws Exception
Throws:
Exception

releaseMessagingContext

public static void releaseMessagingContext()
                                    throws Exception
Throws:
Exception

prepareTestResources

public void prepareTestResources()

postANewComment

public void postANewComment()

postANewCommentFromTool

public void postANewCommentFromTool()

postAnAlreadyExistingComment

public void postAnAlreadyExistingComment()
In a such situation, the comment is created as a new one.


postAnAlreadyExistingCommentFromTool

public void postAnAlreadyExistingCommentFromTool()

postAnInvalidComment

public void postAnInvalidComment()

aResourceURI

public String aResourceURI()

aToolResourceURI

public String aToolResourceURI()

anUnexistingResourceURI

public String anUnexistingResourceURI()

aResource

public CommentEntity aResource()

getSessionKey

public String getSessionKey()

getWebEntityClass

public Class<?> getWebEntityClass()

getExistingComponentInstances

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

getExistingTools

public String[] getExistingTools()
Overrides:
getExistingTools in class RESTWebServiceTest<CommentTestResources>


Copyright © 2016 Silverpeas. All Rights Reserved.