Examples of ActivityDTO


Examples of com.mossle.bpm.ActivityDTO

    public List<ActivityDTO> convertActivityDtos(List<PvmActivity> pvmActivities) {
        List<ActivityDTO> activityDtos = new ArrayList<ActivityDTO>();

        for (PvmActivity pvmActivity : pvmActivities) {
            ActivityDTO activityDto = new ActivityDTO();
            activityDto.setId(pvmActivity.getId());
            activityDto.setName((String) pvmActivity.getProperty("name"));
            activityDtos.add(activityDto);
        }

        return activityDtos;
    }
View Full Code Here

Examples of org.eurekastreams.server.domain.stream.ActivityDTO

     * Test successful validation of the action.
     */
    @Test
    public void testSuccessfulValidation()
    {
        ActivityDTO currentActivity = PostActivityTestHelpers.buildActivityDTO(
                PostActivityTestHelpers.DestinationStreamTestState.VALID, false, testComment, DESTINATION_ID);

        currentRequest = new PostActivityRequest(currentActivity);

        currentActionContext = new ServiceActionContext(currentRequest, currentPrincipal);
View Full Code Here

Examples of org.eurekastreams.server.domain.stream.ActivityDTO

     * Tests that the Check for Verb Validator presence in the Map fails correctly.
     */
    @Test(expected = ValidationException.class)
    public void testVerbTypeFailure()
    {
        ActivityDTO currentActivity = PostActivityTestHelpers.buildActivityDTO(
                PostActivityTestHelpers.DestinationStreamTestState.VALID, true, testComment, DESTINATION_ID);

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

View Full Code Here

Examples of org.eurekastreams.server.domain.stream.ActivityDTO

     * Tests that the VerbValidator fails correctly.
     */
    @Test(expected = ValidationException.class)
    public void testVerbValidatorFailure()
    {
        ActivityDTO currentActivity = PostActivityTestHelpers.buildActivityDTO(
                PostActivityTestHelpers.DestinationStreamTestState.VALID, false, testComment, DESTINATION_ID);

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

View Full Code Here

Examples of org.eurekastreams.server.domain.stream.ActivityDTO

     * Test that the ActivityValidator fails correctly.
     */
    @Test(expected = ValidationException.class)
    public void testObjectValidatorFailure()
    {
        ActivityDTO currentActivity = PostActivityTestHelpers.buildActivityDTO(
                PostActivityTestHelpers.DestinationStreamTestState.VALID, false, testComment, DESTINATION_ID);

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

View Full Code Here

Examples of org.eurekastreams.server.domain.stream.ActivityDTO

     * Tests that a Null Destination Stream fails validation.
     */
    @Test(expected = ValidationException.class)
    public void testNullDestinationStream()
    {
        ActivityDTO currentActivity = PostActivityTestHelpers.buildActivityDTO(
                PostActivityTestHelpers.DestinationStreamTestState.NULLSTREAM, false, testComment, DESTINATION_ID);

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

View Full Code Here

Examples of org.eurekastreams.server.domain.stream.ActivityDTO

     * Tests that a Null Destination Stream Identifier fails validation.
     */
    @Test(expected = ValidationException.class)
    public void testNullDestinationStreamIdentifier()
    {
        ActivityDTO currentActivity = PostActivityTestHelpers.buildActivityDTO(
                PostActivityTestHelpers.DestinationStreamTestState.NULLIDENTIFIER, false, testComment, DESTINATION_ID);

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

View Full Code Here

Examples of org.eurekastreams.server.domain.stream.ActivityDTO

     * Tests that an Empty Destination Stream Identifier fails validation.
     */
    @Test(expected = ValidationException.class)
    public void testEmptyDestinationStreamIdentifier()
    {
        ActivityDTO currentActivity = PostActivityTestHelpers.buildActivityDTO(
                PostActivityTestHelpers.DestinationStreamTestState.EMPTYIDENTIFIER, true, testComment, DESTINATION_ID);

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

View Full Code Here

Examples of org.eurekastreams.server.domain.stream.ActivityDTO

     * Tests that an Empty Destination Stream Identifier fails validation.
     */
    @Test(expected = ValidationException.class)
    public void testInvalidDestinationStreamIdentifier()
    {
        ActivityDTO currentActivity = PostActivityTestHelpers.buildActivityDTO(
                PostActivityTestHelpers.DestinationStreamTestState.INVALIDTYPE, false, testComment, DESTINATION_ID);

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

View Full Code Here

Examples of org.eurekastreams.server.domain.stream.ActivityDTO

     * Tests resolveActivityBody.
     */
    @Test
    public void testResolveActivityBody()
    {
        final ActivityDTO activity = context.mock(ActivityDTO.class, "activity");
        final StreamEntityDTO actor = context.mock(StreamEntityDTO.class, "actor");
        final HashMap<String, String> baseObjectProps = new HashMap<String, String>();
        context.checking(new Expectations()
        {
            {
                allowing(activity).getBaseObjectProperties();
                will(returnValue(baseObjectProps));
                allowing(activity).getActor();
                will(returnValue(actor));
                allowing(actor).getDisplayName();
                will(returnValue("John Doe"));
            }
        });
        activity.getBaseObjectProperties().put("content", "Blah %EUREKA:ACTORNAME% blah %EUREKA:NOSUCH% blah.");

        String result = sut.resolveActivityBody(activity, velocityContext);

        context.assertIsSatisfied();

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.