Examples of PostActivityRequest


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

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

    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

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

    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

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

    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

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

    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

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

     * 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

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

     * 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

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

     * 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

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

     * 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

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

     * 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
Copyright © 2018 www.massapi.com. 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.