Package org.apache.rave.portal.model.impl

Examples of org.apache.rave.portal.model.impl.ApplicationDataImpl


        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


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

        appDataService.updatePersonData(userId, groupId, VALID_APPLICATION_ID, fields, values, securityToken);

        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

    @Transactional(readOnly=false)
    @Rollback(true)
    public void delete_implObject() {
        ApplicationData applicationData = repository.get(VALID_APPLICATION_DATA_ID);
        assertThat(applicationData, is(notNullValue()));
        ApplicationDataImpl impl = new ApplicationDataImpl(applicationData.getId());
        repository.delete(impl);
        applicationData = repository.get(VALID_APPLICATION_DATA_ID);
        assertThat(applicationData, is(nullValue()));
    }
View Full Code Here

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

    @Test
    public void newApplicationData() {
        ApplicationData applicationData = new ApplicationDataImpl();
        applicationData.setId(1L);
        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(), 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

        validApplicationDataMap = new HashMap<String, String>();
        validApplicationDataMap.put("color", "blue");
        validApplicationDataMap.put("speed", "fast");
        validApplicationDataMap.put("state", "MA");
        validApplicationData = new ApplicationDataImpl(VALID_APPLICATION_DATA_ID, VALID_VIEWER_ID, VALID_APPLICATION_ID,
                validApplicationDataMap);

        validPerson = new PersonImpl();
        validPerson.setUsername(VALID_VIEWER_ID);
    }
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

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

        appDataService.updatePersonData(userId, groupId, VALID_APPLICATION_ID, fields, values, securityToken);

        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

        validApplicationDataMap = new HashMap<String, String>();
        validApplicationDataMap.put("color", "blue");
        validApplicationDataMap.put("speed", "fast");
        validApplicationDataMap.put("state", "MA");
        validApplicationData = new ApplicationDataImpl(VALID_APPLICATION_DATA_ID, VALID_VIEWER_ID, VALID_APPLICATION_ID,
                validApplicationDataMap);

        validPerson = new PersonImpl();
        validPerson.setUsername(VALID_VIEWER_ID);
    }
View Full Code Here

        testDeletePersonDataNoAppDataExpected(null);
    }

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

TOP

Related Classes of org.apache.rave.portal.model.impl.ApplicationDataImpl

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.