Package org.eurekastreams.server.domain

Examples of org.eurekastreams.server.domain.Person


                oneOf(ldapPersonMapper).findPeople(userAcctId, 1);
                will(returnValue(new ArrayList<Person>()));
            }
        });

        Person result = sut.execute(taskHandlerActionContextMock);
        assertNull(result);
        context.assertIsSatisfied();
    }
View Full Code Here


    @Test
    public void getSuccess() throws Exception
    {
        final HashMap<String, Serializable> formData = new HashMap<String, Serializable>();
        final long id = 1L;
        final Person testPerson = new Person();
        formData.put(DomainGroupModelView.ID_KEY, Long.toString(id));
        final DomainGroup expectedGroup = new DomainGroup("newOrg", "newOrg", testPerson);

        final String accessingUser = "jschmoe";
        expectedGroup.addCoordinator(new Person(accessingUser, "b", "c", "d", "e"));

        context.checking(new Expectations()
        {
            {
                oneOf(groupMapperMock).findById(with(any(Long.class)));
View Full Code Here

     *             not expected
     */
    @Test
    public void persistSuccessWithNoGroupNameUpdate() throws Exception
    {
        final DomainGroup group = new DomainGroup("Group Name", "shortName", new Person("id", "Homer", "Jay",
                "Simpson", "Homey"));

        final List<Person> attribMembers = new ArrayList<Person>();
        attribMembers.add(new Person("id", "Homer", "Jay", "Simpson", "Homey"));
        attribMembers.add(new Person("id", "Max", "X", "Power", "Homer"));

        group.setCoordinators(new HashSet(attribMembers));

        final long id = 1L;
        String newName = "NEW group name here";
View Full Code Here

     */
    @SuppressWarnings("deprecation")
    @Test
    public void persistSuccessWithOrgUpdate() throws Exception
    {
        final DomainGroup group = new DomainGroup("Group Name", "shortName", new Person("id", "Homer", "Jay",
                "Simpson", "Homey"));

        final List<Person> attribMembers = new ArrayList<Person>();
        attribMembers.add(new Person("id", "Homer", "Jay", "Simpson", "Homey"));
        attribMembers.add(new Person("id", "Max", "X", "Power", "Homer"));

        group.setCoordinators(new HashSet(attribMembers));

        final long id = 1L;
        String newName = "NEW name here";
View Full Code Here

     *             not expected
     */
    @Test
    public void persistSuccessWithUpdatedGroupName() throws Exception
    {
        final DomainGroup newGroup = new DomainGroup("Group Name", "shortName", new Person("id", "Homer", "Jay",
                "Simpson", "Homey"));

        final List<Person> attribMembers = new ArrayList<Person>();
        attribMembers.add(new Person("id", "Homer", "Jay", "Simpson", "Homey"));
        attribMembers.add(new Person("id", "Max", "X", "Power", "Homer"));

        newGroup.setCoordinators(new HashSet(attribMembers));

        final long id = 1L;
        String newName = "NEW group name here";
View Full Code Here

     *             not expected
     */
    @Test
    public void persistSuccessWithNewCoordinators() throws Exception
    {
        final DomainGroup group = new DomainGroup("Group Name", "shortName", new Person("id1", "Homer", "Jay",
                "Simpson", "Homey"));

        final Set<Person> attribMembers = new HashSet<Person>();
        attribMembers.add(new Person("id1", "Homer", "Jay", "Simpson", "Homey"));
        attribMembers.add(new Person("id2", "Max", "X", "Power", "Homer"));

        group.setCoordinators(new HashSet(attribMembers));

        group.getCoordinators().add(new Person("id3", "A", "New", "Member", "Guy"));

        final long id = 1L;
        String newName = "NEW group name here";

        final HashMap<String, Serializable> formData = new HashMap<String, Serializable>();
View Full Code Here

      
       Long testReturn = (Long) sut.execute(currentContext);
       context.assertIsSatisfied();
       assertEquals(testId, testReturn);
             
       Person personTest = personMapper.findByAccountId("fordp");
      
       assertTrue(personTest.getOptOutVideos().contains(testId));
      
   }
View Full Code Here

    /**
     * Populate a global collection of people to be used in tests.
     */
    private void buildPeople()
    {
        Person authorPerson = new Person();
        authorPerson.setOpenSocialId(AUTHOR_OPENSOCIAL_ID);
        Person subjectPerson = new Person();
        subjectPerson.setOpenSocialId(SUBJECT_OPENSOCIAL_ID);
       
        people.add(authorPerson);
        people.add(subjectPerson);
    }
View Full Code Here

    public void validateParams()
    {

        HashSet<Person> coordinators = new HashSet<Person>();

        Person personMock = context.mock(Person.class);
        coordinators.add(personMock);

        final HashMap<String, Serializable> formData = new HashMap<String, Serializable>();

        formData.put(DomainGroupModelView.NAME_KEY, ValidationTestHelper.generateString(DomainGroup.MAX_NAME_LENGTH));
View Full Code Here

    @Test
    public void sutinitionConstructor()
    {
        String gadgetUrl = "http://www.example.com";
        GalleryItemCategory gic = new GalleryItemCategory("face");
        Person person = new Person();

        sut = new PluginDefinition();

        sut.setUrl(gadgetUrl);
        sut.setCategory(gic);
View Full Code Here

TOP

Related Classes of org.eurekastreams.server.domain.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.