Package org.eurekastreams.server.action.request.stream

Examples of org.eurekastreams.server.action.request.stream.PostActivityRequest


    public void testObjectValidatorFailure()
    {
        ActivityDTO currentActivity = PostActivityTestHelpers.buildActivityDTO(
                PostActivityTestHelpers.DestinationStreamTestState.VALID, false, testComment, DESTINATION_ID);

        currentRequest = new PostActivityRequest(currentActivity);
        currentActionContext = new ServiceActionContext(currentRequest, currentPrincipal);

        context.checking(new Expectations()
        {
            {
View Full Code Here


    public void testNullDestinationStream()
    {
        ActivityDTO currentActivity = PostActivityTestHelpers.buildActivityDTO(
                PostActivityTestHelpers.DestinationStreamTestState.NULLSTREAM, false, testComment, DESTINATION_ID);

        currentRequest = new PostActivityRequest(currentActivity);
        currentActionContext = new ServiceActionContext(currentRequest, currentPrincipal);

        sut.validate(currentActionContext);
    }
View Full Code Here

    public void testNullDestinationStreamIdentifier()
    {
        ActivityDTO currentActivity = PostActivityTestHelpers.buildActivityDTO(
                PostActivityTestHelpers.DestinationStreamTestState.NULLIDENTIFIER, false, testComment, DESTINATION_ID);

        currentRequest = new PostActivityRequest(currentActivity);
        currentActionContext = new ServiceActionContext(currentRequest, currentPrincipal);

        sut.validate(currentActionContext);
    }
View Full Code Here

    public void testEmptyDestinationStreamIdentifier()
    {
        ActivityDTO currentActivity = PostActivityTestHelpers.buildActivityDTO(
                PostActivityTestHelpers.DestinationStreamTestState.EMPTYIDENTIFIER, true, testComment, DESTINATION_ID);

        currentRequest = new PostActivityRequest(currentActivity);
        currentActionContext = new ServiceActionContext(currentRequest, currentPrincipal);

        sut.validate(currentActionContext);
    }
View Full Code Here

    public void testInvalidDestinationStreamIdentifier()
    {
        ActivityDTO currentActivity = PostActivityTestHelpers.buildActivityDTO(
                PostActivityTestHelpers.DestinationStreamTestState.INVALIDTYPE, false, testComment, DESTINATION_ID);

        currentRequest = new PostActivityRequest(currentActivity);
        currentActionContext = new ServiceActionContext(currentRequest, currentPrincipal);

        sut.validate(currentActionContext);
    }
View Full Code Here

     * posting.
     */
    @Test
    public void testPublicGroupDestinationActivityPostSuccessfulAuthorization()
    {
        PostActivityRequest currentRequest = new PostActivityRequest(testActivity);
        Principal currentPrincipal = new DefaultPrincipal(ACCOUNT_ID, OPENSOCIAL_ID, ID);
        ServiceActionContext currentActionContext = new ServiceActionContext(currentRequest, currentPrincipal);

        final Set<Long> groupCoords = new HashSet<Long>();
        groupCoords.add(ID);
View Full Code Here

     * Test the successful authorization of an activity posting into a person's stream.
     */
    @Test
    public void testPersonDestinationActivityPostSuccessfulAuthorization()
    {
        PostActivityRequest currentRequest = new PostActivityRequest(testActivity);
        Principal currentPrincipal = new DefaultPrincipal(ACCOUNT_ID, OPENSOCIAL_ID, ID);
        ServiceActionContext currentActionContext = new ServiceActionContext(currentRequest, currentPrincipal);

        context.checking(new Expectations()
        {
View Full Code Here

     * Test the successful authorization of an activity posting into a person's stream.
     */
    @Test
    public void testPersonDestinationActivityPostSuccessfulStreamPostableAuthorization()
    {
        PostActivityRequest currentRequest = new PostActivityRequest(testActivity);
        Principal currentPrincipal = new DefaultPrincipal(ACCOUNT_ID, OPENSOCIAL_ID, ID);
        ServiceActionContext currentActionContext = new ServiceActionContext(currentRequest, currentPrincipal);

        context.checking(new Expectations()
        {
View Full Code Here

     * Test the failure authorization of an activity posting into an unhandled entity type's stream.
     */
    @Test(expected = AuthorizationException.class)
    public void testInvalidDestinationActivityPostFailureAuthorization()
    {
        PostActivityRequest currentRequest = new PostActivityRequest(testActivity);
        Principal currentPrincipal = new DefaultPrincipal(ACCOUNT_ID, OPENSOCIAL_ID, ID);
        ServiceActionContext currentActionContext = new ServiceActionContext(currentRequest, currentPrincipal);

        context.checking(new Expectations()
        {
View Full Code Here

     * configured to non-postable.
     */
    @Test(expected = AuthorizationException.class)
    public void testPublicGroupDestinationActivityPostFailureAuthorization()
    {
        PostActivityRequest currentRequest = new PostActivityRequest(testActivity);
        Principal currentPrincipal = new DefaultPrincipal(ACCOUNT_ID, OPENSOCIAL_ID, BAD_ID);
        ServiceActionContext currentActionContext = new ServiceActionContext(currentRequest, currentPrincipal);

        final Set<Long> groupCoords = new HashSet<Long>();
        groupCoords.add(ID);
View Full Code Here

TOP

Related Classes of org.eurekastreams.server.action.request.stream.PostActivityRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.