Package org.apache.rave.portal.model

Examples of org.apache.rave.portal.model.ApplicationData


        testDeletePersonDataNoAppDataExpected(null);
    }

    @Test
    public void deletePersonData_validRequest_emptyApplicationData() throws Exception {
        ApplicationData applicationData = new ApplicationDataImpl();
        testDeletePersonDataNoAppDataExpected(applicationData);
    }
View Full Code Here


        lockService.returnLock(lock);
        replay(lockService);

        appDataService.deletePersonData(userId, groupId, VALID_APPLICATION_ID, fieldsToDelete, securityToken);

        ApplicationData expectedApplicationData = new ApplicationDataImpl(applicationData.getId(),
                applicationData.getUserId(), applicationData.getAppUrl(), expectedApplicationDataAfterDelete);

        ApplicationData actualApplicationData = capturedApplicationData.getValue();
        assertEquals(expectedApplicationData.getId(), actualApplicationData.getId());
        assertEquals(expectedApplicationData.getUserId(), actualApplicationData.getUserId());
        assertEquals(expectedApplicationData.getAppUrl(), actualApplicationData.getAppUrl());
        assertEquals(expectedApplicationData.getData(), actualApplicationData.getData());
    }
View Full Code Here

        ApplicationDataImpl expectedApplicationData = applicationData == null ? new ApplicationDataImpl(null, VALID_USER_ID,
                VALID_APPLICATION_ID, expectedApplicationDataAfterUpdate) :
                new ApplicationDataImpl(applicationData.getId(), applicationData.getUserId(),
                        applicationData.getAppUrl(), expectedApplicationDataAfterUpdate);

        ApplicationData actualApplicationData = capturedApplicationData.getValue();
        assertEquals(expectedApplicationData.getId(), actualApplicationData.getId());
        assertEquals(expectedApplicationData.getUserId(), actualApplicationData.getUserId());
        assertEquals(expectedApplicationData.getAppUrl(), actualApplicationData.getAppUrl());
        assertEquals(expectedApplicationData.getData(), actualApplicationData.getData());
    }
View Full Code Here

        testDeletePersonDataNoAppDataExpected(null);
    }

    @Test
    public void deletePersonData_validRequest_emptyApplicationData() throws Exception {
        ApplicationData applicationData = new ApplicationDataImpl();
        testDeletePersonDataNoAppDataExpected(applicationData);
    }
View Full Code Here

        lockService.returnLock(lock);
        replay(lockService);

        appDataService.deletePersonData(userId, groupId, VALID_APPLICATION_ID, fieldsToDelete, securityToken);

        ApplicationData expectedApplicationData = new ApplicationDataImpl(applicationData.getId(),
                applicationData.getUserId(), applicationData.getAppUrl(), expectedApplicationDataAfterDelete);

        ApplicationData actualApplicationData = capturedApplicationData.getValue();
        assertEquals(expectedApplicationData.getId(), actualApplicationData.getId());
        assertEquals(expectedApplicationData.getUserId(), actualApplicationData.getUserId());
        assertEquals(expectedApplicationData.getAppUrl(), actualApplicationData.getAppUrl());
        assertEquals(expectedApplicationData.getData(), actualApplicationData.getData());
    }
View Full Code Here

        ApplicationDataImpl expectedApplicationData = applicationData == null ? new ApplicationDataImpl(null, VALID_USER_ID,
                VALID_APPLICATION_ID, expectedApplicationDataAfterUpdate) :
                new ApplicationDataImpl(applicationData.getId(), applicationData.getUserId(),
                        applicationData.getAppUrl(), expectedApplicationDataAfterUpdate);

        ApplicationData actualApplicationData = capturedApplicationData.getValue();
        assertEquals(expectedApplicationData.getId(), actualApplicationData.getId());
        assertEquals(expectedApplicationData.getUserId(), actualApplicationData.getUserId());
        assertEquals(expectedApplicationData.getAppUrl(), actualApplicationData.getAppUrl());
        assertEquals(expectedApplicationData.getData(), actualApplicationData.getData());
    }
View Full Code Here

    @Autowired
    private JpaApplicationDataConverter applicationDataConverter;

    @Test
    public void noConversion() {
        ApplicationData applicationData = new JpaApplicationData();
        assertThat(applicationDataConverter.convert(applicationData), is(sameInstance(applicationData)));
    }
View Full Code Here

        assertThat(applicationDataConverter.convert(applicationData), is(sameInstance(applicationData)));
    }

    @Test
    public void nullConversion() {
        ApplicationData applicationData = null;
        assertThat(applicationDataConverter.convert(applicationData), is(nullValue()));
    }
View Full Code Here

        assertThat(applicationDataConverter.convert(applicationData), is(nullValue()));
    }

    @Test
    public void newApplicationData() {
        ApplicationData applicationData = new ApplicationDataImpl();
        applicationData.setId("1");
        applicationData.setAppUrl("url");
        applicationData.setData(new HashMap<String, String>());
        applicationData.setUserId("userid");

        JpaApplicationData converted = applicationDataConverter.convert(applicationData);
        assertThat(converted, is(not(sameInstance(applicationData))));
        assertThat(converted, is(instanceOf(JpaApplicationData.class)));
        assertThat(converted.getId(), is(equalTo(applicationData.getId())));
        assertThat(converted.getEntityId().toString(), is(equalTo(applicationData.getId())));
        assertThat(converted.getAppUrl(), is(equalTo(applicationData.getAppUrl())));
        assertThat(converted.getData(), is(equalTo(applicationData.getData())));
        assertThat(converted.getUserId(), is(equalTo(applicationData.getUserId())));
    }
View Full Code Here

        validateApplicationData(applicationData);
    }

    @Test
    public void get_invalid() {
        ApplicationData applicationData = repository.get("-1");
        assertThat(applicationData, is(nullValue()));
    }
View Full Code Here

TOP

Related Classes of org.apache.rave.portal.model.ApplicationData

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.