Examples of BackgroundItem


Examples of org.eurekastreams.server.domain.BackgroundItem

     */
    @Test
    public void testObjectToString()
    {
        List<BackgroundItem> items =
                Arrays.asList(new BackgroundItem("ACM", BackgroundItemType.AFFILIATION), new BackgroundItem(
                        "Skull and Crossbones", BackgroundItemType.AFFILIATION), new BackgroundItem("Java",
                        BackgroundItemType.SKILL), new BackgroundItem("C#", BackgroundItemType.SKILL),
                        new BackgroundItem("Technology", BackgroundItemType.INTEREST), new BackgroundItem("Apple",
                                BackgroundItemType.INTEREST), new BackgroundItem("SRA", BackgroundItemType.HONOR),
                        new BackgroundItem("SPOT", BackgroundItemType.HONOR));

        String objToString = sut.objectToString(items);

        assertTrue(objToString.contains(" ACM "));
        assertTrue(objToString.contains(" Skull and Crossbones "));
View Full Code Here

Examples of org.eurekastreams.server.domain.BackgroundItem

    public void testUpdateEnrollmentCollections()
    {
        final long enrollmentId = 2042L;
        Enrollment enrollment = jpaEnrollmentMapper.findById(enrollmentId);
        ArrayList<BackgroundItem> activities = new ArrayList<BackgroundItem>(3);
        activities.add(new BackgroundItem("a", BackgroundItemType.ACTIVITY_OR_SOCIETY));
        activities.add(new BackgroundItem("b", BackgroundItemType.ACTIVITY_OR_SOCIETY));
        activities.add(new BackgroundItem("c", BackgroundItemType.ACTIVITY_OR_SOCIETY));
        enrollment.setActivities(activities);

        ArrayList<BackgroundItem> areasOfStudy = new ArrayList<BackgroundItem>(3);
        areasOfStudy.add(new BackgroundItem("d", BackgroundItemType.AREA_OF_STUDY));
        areasOfStudy.add(new BackgroundItem("e", BackgroundItemType.AREA_OF_STUDY));
        areasOfStudy.add(new BackgroundItem("f", BackgroundItemType.AREA_OF_STUDY));
        areasOfStudy.add(new BackgroundItem("g", BackgroundItemType.AREA_OF_STUDY));
        enrollment.setAreasOfStudy(areasOfStudy);

        jpaEnrollmentMapper.flush();
        jpaEnrollmentMapper.getEntityManager().clear();
View Full Code Here

Examples of org.eurekastreams.server.domain.BackgroundItem

    public void voidTestFlushAndIndex()
    {
        final long enrollmentId = 2042L;
        Enrollment enrollment = jpaEnrollmentMapper.findById(enrollmentId);
        ArrayList<BackgroundItem> activities = new ArrayList<BackgroundItem>(3);
        activities.add(new BackgroundItem("a", BackgroundItemType.ACTIVITY_OR_SOCIETY));
        activities.add(new BackgroundItem("b", BackgroundItemType.ACTIVITY_OR_SOCIETY));
        activities.add(new BackgroundItem("c", BackgroundItemType.ACTIVITY_OR_SOCIETY));
        enrollment.setActivities(activities);

        ArrayList<BackgroundItem> areasOfStudy = new ArrayList<BackgroundItem>(3);
        areasOfStudy.add(new BackgroundItem("d", BackgroundItemType.AREA_OF_STUDY));
        areasOfStudy.add(new BackgroundItem("e", BackgroundItemType.AREA_OF_STUDY));
        areasOfStudy.add(new BackgroundItem("f", BackgroundItemType.AREA_OF_STUDY));
        areasOfStudy.add(new BackgroundItem("g", BackgroundItemType.AREA_OF_STUDY));
        enrollment.setAreasOfStudy(areasOfStudy);

        jpaEnrollmentMapper.flush("2d359911-0977-418a-9490-57e8252b1142");
       
        jpaEnrollmentMapper.getEntityManager().clear();
View Full Code Here

Examples of org.eurekastreams.server.domain.BackgroundItem

        final Date gradDate = df.parse("2008");

        final String additionalDetails = "this that and the other thing";

        final List<BackgroundItem> areasOfStudy = new ArrayList<BackgroundItem>();
        areasOfStudy.add(new BackgroundItem("electrical engineering", BackgroundItemType.AREA_OF_STUDY));
        areasOfStudy.add(new BackgroundItem("computer scientce", BackgroundItemType.AREA_OF_STUDY));
        areasOfStudy.add(new BackgroundItem("music", BackgroundItemType.AREA_OF_STUDY));
        areasOfStudy.add(new BackgroundItem("goofing off", BackgroundItemType.AREA_OF_STUDY));

        final List<BackgroundItem> activities = new ArrayList<BackgroundItem>();
        activities.add(new BackgroundItem("marching band", BackgroundItemType.ACTIVITY_OR_SOCIETY));
        activities.add(new BackgroundItem("computer geek club", BackgroundItemType.ACTIVITY_OR_SOCIETY));
        activities.add(new BackgroundItem("ieee", BackgroundItemType.ACTIVITY_OR_SOCIETY));

        context.checking(new Expectations()
        {
            {
                // create JSON representation
View Full Code Here

Examples of org.eurekastreams.server.domain.BackgroundItem

    public void testObjectToString()
    {
        Person person = context.mock(Person.class);
        Background bg = new Background(person);

        bg.setBackgroundItems(Arrays.asList(new BackgroundItem("ACM", BackgroundItemType.SKILL), new BackgroundItem(
                "Skull and Crossbones", BackgroundItemType.SKILL),
                new BackgroundItem("Java", BackgroundItemType.SKILL),
                new BackgroundItem("C#", BackgroundItemType.SKILL), new BackgroundItem("Technology",
                        BackgroundItemType.SKILL), new BackgroundItem("Apple", BackgroundItemType.SKILL),
                new BackgroundItem("SRA", BackgroundItemType.SKILL), new BackgroundItem("SPOT",
                        BackgroundItemType.SKILL)), BackgroundItemType.SKILL);

        String objToString = sut.objectToString(bg);

        assertTrue(objToString.contains(" ACM "));
View Full Code Here

Examples of org.eurekastreams.server.domain.BackgroundItem

        CollectionFormat formatter = new CollectionFormat();
        List<BackgroundItem> backgroundItems = new ArrayList<BackgroundItem>();
        Collection<String> elements = formatter.parse(toParse);
        for (String token : elements)
        {
            backgroundItems.add(new BackgroundItem(token, type));
        }
        return backgroundItems;
    }
View Full Code Here

Examples of org.eurekastreams.server.domain.BackgroundItem

        Background background = new Background(person);

        jpaBackgroundMapper.insert(background);

        List<BackgroundItem> expectedBackgroundItems = new ArrayList<BackgroundItem>();
        expectedBackgroundItems.add(new BackgroundItem("sports", BackgroundItemType.INTEREST));
        expectedBackgroundItems.add(new BackgroundItem("music", BackgroundItemType.INTEREST));
        expectedBackgroundItems.add(new BackgroundItem("software", BackgroundItemType.INTEREST));
        background.setBackgroundItems(expectedBackgroundItems, BackgroundItemType.HONOR);

        jpaBackgroundMapper.getEntityManager().flush();
        jpaBackgroundMapper.getEntityManager().clear();
View Full Code Here

Examples of org.eurekastreams.server.domain.BackgroundItem

        Background background = new Background(person);

        jpaBackgroundMapper.insert(background);

        List<BackgroundItem> expectedBackgroundItems = new ArrayList<BackgroundItem>();
        expectedBackgroundItems.add(new BackgroundItem("sports", BackgroundItemType.INTEREST));
        expectedBackgroundItems.add(new BackgroundItem("music", BackgroundItemType.INTEREST));
        expectedBackgroundItems.add(new BackgroundItem("software", BackgroundItemType.INTEREST));
        background.setBackgroundItems(expectedBackgroundItems, BackgroundItemType.HONOR);

        jpaBackgroundMapper.getEntityManager().flush();
        jpaBackgroundMapper.getEntityManager().clear();
View Full Code Here

Examples of org.eurekastreams.server.domain.BackgroundItem

        final Date gradDate = df.parse("2008");
       
        final String additionalDetails = "this that and the other thing";
             
        final List<BackgroundItem> areasOfStudy = new ArrayList<BackgroundItem>();
        areasOfStudy.add(new BackgroundItem("electrical engineering", BackgroundItemType.AREA_OF_STUDY));
        areasOfStudy.add(new BackgroundItem("computer science", BackgroundItemType.AREA_OF_STUDY));
        areasOfStudy.add(new BackgroundItem("music", BackgroundItemType.AREA_OF_STUDY));
        areasOfStudy.add(new BackgroundItem("goofing off", BackgroundItemType.AREA_OF_STUDY));
       
        final List<BackgroundItem> activities = new ArrayList<BackgroundItem>();
        activities.add(new BackgroundItem("marching band", BackgroundItemType.ACTIVITY_OR_SOCIETY));
        activities.add(new BackgroundItem("computer geek club", BackgroundItemType.ACTIVITY_OR_SOCIETY));
        activities.add(new BackgroundItem("ieee", BackgroundItemType.ACTIVITY_OR_SOCIETY));

        context.checking(new Expectations()
        {
            {
                //create JSON representation
View Full Code Here

Examples of org.eurekastreams.server.domain.BackgroundItem

    {
        ArrayList<BackgroundItem> results = new ArrayList<BackgroundItem>(jAarray.size());       
        for (Object o : jAarray)
        {
            String name = (String) o;
            results.add(new BackgroundItem(name, type));
        }
        return results;
    }
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.