Package org.apache.rave.portal.model

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


        assertThat(person, is(not(nullValue())));
        assertThat(person.getUsername(), is(equalTo(VALID_USER)));
    }
    @Test
    public void findByUsername_null() {
        Person person = repository.findByUsername(INVALID_USERNAME);
        assertThat(person, is(nullValue()));
    }
View Full Code Here


    @Test
    @Transactional(readOnly=false)
    @Rollback(true)
    public void save_existing() {
        final String UPDATED_ABOUT_ME = "updated about me";
        Person person = repository.get(VALID_ID);
        assertThat(person.getAboutMe(), is(not(UPDATED_ABOUT_ME)));
        person.setAboutMe(UPDATED_ABOUT_ME);
        repository.save(person);
        assertThat(repository.get(VALID_ID).getAboutMe(), is(UPDATED_ABOUT_ME));
    }
View Full Code Here

    @Test
    @Transactional(readOnly=false)
    @Rollback(true)
    public void delete_jpaObject() {
        Person person = repository.get(VALID_ID);
        assertThat(person, is(notNullValue()));
        repository.delete(person);
        person = repository.get(VALID_ID);
        assertThat(person, is(nullValue()));
    }
View Full Code Here

    @Test
    @Transactional(readOnly=false)
    @Rollback(true)
    public void delete_implObject() {
        Person person = repository.get(VALID_ID);
        assertThat(person, is(notNullValue()));
        PersonImpl impl = new PersonImpl();
        impl.setUsername(person.getUsername());
        repository.delete(impl);
        person = repository.get(VALID_ID);
        assertThat(person, is(nullValue()));
    }
View Full Code Here

        assertThat(friends.get(1).getUsername(), is(equalTo(VALID_USER)));
    }

    @Test
    public void read_properties() {
        Person person = repository.get(VALID_ID);
      assertThat(person.getProperties().size(), is(1));
    }
View Full Code Here

    @Test
    @Transactional(readOnly=false)
    @Rollback(true)
    public void delete_jpaObject() {
        Person person = repository.get(VALID_ID);
        assertThat(person, is(notNullValue()));
        repository.delete(person);
        person = repository.get(VALID_ID);
        assertThat(person, is(nullValue()));
    }
View Full Code Here

    @Test
    @Transactional(readOnly=false)
    @Rollback(true)
    public void delete_implObject() {
        Person person = repository.get(VALID_ID);
        assertThat(person, is(notNullValue()));
        PersonImpl impl = new PersonImpl();
        impl.setUsername(person.getUsername());
        repository.delete(impl);
        person = repository.get(VALID_ID);
        assertThat(person, is(nullValue()));
    }
View Full Code Here

        assertThat(friendsUser2.size(), is(equalTo(0)));
    }

    @Test
    public void read_properties() {
        Person person = repository.get(VALID_ID);
      assertThat(person.getProperties().size(), is(1));
    }
View Full Code Here

    @Override
    public SearchResult<Person> getLimitedListOfPersons(int offset, int pageSize) {
        SearchResult<User> users = getLimitedListOfUsers(offset, pageSize);
        int count = users.getTotalResults();
        List<Person> people = new ArrayList<Person>();
        Person person = null;
        for(User user : users.getResultSet()){
            person = user.toPerson();
            person.setId(user.getId());
            people.add(person);
        }
        return new SearchResult<Person>(people, count);
    }
View Full Code Here

    @Override
    public SearchResult<Person> getPersonsByFreeTextSearch(String searchTerm, int offset, int pageSize) {
        SearchResult<User> users = getUsersByFreeTextSearch(searchTerm, offset, pageSize);
        int count = users.getTotalResults();
        List<Person> people = new ArrayList<Person>();
        Person person = null;
        for(User user : users.getResultSet()){
            person = user.toPerson();
            person.setId(user.getId());
            people.add(person);
        }
        return new SearchResult<Person>(people, count);
    }
View Full Code Here

TOP

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

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.