Search in sources :

Example 11 with GroupableActivity

use of org.orcid.jaxb.model.v3.dev1.record.GroupableActivity in project ORCID-Source by ORCID.

the class ActivitiesGroupGeneratorBaseTest method checkActivitiesDontBelongsToTheSameGroup.

/**
 * Check that the given activities belongs to the same group in a list of given groups
 */
public void checkActivitiesDontBelongsToTheSameGroup(List<ActivitiesGroup> groups, GroupableActivity... activities) {
    for (int i = 0; i < activities.length; i++) {
        GroupableActivity a1 = activities[i];
        ActivitiesGroup theGroup = getGroupThatContainsActivity(groups, a1);
        for (int j = i + 1; j < activities.length; j++) {
            assertFalse("activity[" + i + "] and activity[" + j + "] belongs to the same group", theGroup.belongsToGroup(activities[j]));
        }
    }
}
Also used : GroupableActivity(org.orcid.jaxb.model.v3.dev1.record.GroupableActivity)

Aggregations

GroupableActivity (org.orcid.jaxb.model.v3.dev1.record.GroupableActivity)8 GroupAble (org.orcid.jaxb.model.v3.dev1.record.GroupAble)7 ExternalID (org.orcid.jaxb.model.v3.dev1.record.ExternalID)4 ActivitiesGroup (org.orcid.core.utils.v3.activities.ActivitiesGroup)3 ActivitiesGroupGenerator (org.orcid.core.utils.v3.activities.ActivitiesGroupGenerator)3 GroupableActivityComparator (org.orcid.core.utils.v3.activities.GroupableActivityComparator)2 ExternalIdentifiersContainer (org.orcid.jaxb.model.v3.dev1.record.ExternalIdentifiersContainer)2 PeerReviewGroupKey (org.orcid.jaxb.model.v3.dev1.record.summary.PeerReviewGroupKey)2 PeerReviewSummary (org.orcid.jaxb.model.v3.dev1.record.summary.PeerReviewSummary)2 ArrayList (java.util.ArrayList)1 List (java.util.List)1 LastModifiedDate (org.orcid.jaxb.model.v3.dev1.common.LastModifiedDate)1 ExternalIDs (org.orcid.jaxb.model.v3.dev1.record.ExternalIDs)1 FundingGroup (org.orcid.jaxb.model.v3.dev1.record.summary.FundingGroup)1 FundingSummary (org.orcid.jaxb.model.v3.dev1.record.summary.FundingSummary)1 Fundings (org.orcid.jaxb.model.v3.dev1.record.summary.Fundings)1 PeerReviewGroup (org.orcid.jaxb.model.v3.dev1.record.summary.PeerReviewGroup)1 PeerReviews (org.orcid.jaxb.model.v3.dev1.record.summary.PeerReviews)1 WorkGroup (org.orcid.jaxb.model.v3.dev1.record.summary.WorkGroup)1 WorkSummary (org.orcid.jaxb.model.v3.dev1.record.summary.WorkSummary)1