// Path: ui/src/content/jcr_root/libs/foundation/src/impl/src/main/java/com/day/cq/wcm/foundation/forms/FormResourceEdit.java
// public static class CommonAndPartial {
//     /**
//      * Common values, present in all multi-value properties.
//      */
//     public Set<String> common = new HashSet<String>();
//     /**
//      * Partial values, present only in one or a few multi-value properties,
//      * but not in all.
//      */
//     public Set<String> partial = new HashSet<String>();
// }


import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import junit.framework.TestCase;
import org.apache.sling.api.resource.Resource;
import org.apache.sling.api.resource.ResourceMetadata;
import org.apache.sling.api.resource.ResourceResolver;
import org.apache.sling.api.resource.ValueMap;
import com.day.cq.wcm.foundation.forms.FormResourceEdit.CommonAndPartial;
/*
 * Copyright 1997-2011 Day Management AG
 * Barfuesserplatz 6, 4001 Basel, Switzerland
 * All Rights Reserved.
 *
 * This software is the confidential and proprietary information of
 * Day Management AG, ("Confidential Information"). You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with Day.
 */
package com.day.cq.wcm.foundation.forms;





public class FormResourceEditTest extends TestCase {
    
    private static final String PN_TEST = "test";

    public void testCommonAndPartial() {
        // basic test with 2 resources
        List<Resource> resources = new ArrayList<Resource>();
        resources.add(getResourceWithMultiValue(PN_TEST, "a", "b", "c"));
        resources.add(getResourceWithMultiValue(PN_TEST,      "b", "c", "d"));
        
// Path: ui/src/content/jcr_root/libs/foundation/src/impl/src/main/java/com/day/cq/wcm/foundation/forms/FormResourceEdit.java
// public static class CommonAndPartial {
//     /**
//      * Common values, present in all multi-value properties.
//      */
//     public Set<String> common = new HashSet<String>();
//     /**
//      * Partial values, present only in one or a few multi-value properties,
//      * but not in all.
//      */
//     public Set<String> partial = new HashSet<String>();
// }


// Path: ui/src/content/jcr_root/libs/foundation/src/impl/src/test/java/com/day/cq/wcm/foundation/forms/FormResourceEditTest.java
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import junit.framework.TestCase;
import org.apache.sling.api.resource.Resource;
import org.apache.sling.api.resource.ResourceMetadata;
import org.apache.sling.api.resource.ResourceResolver;
import org.apache.sling.api.resource.ValueMap;
import com.day.cq.wcm.foundation.forms.FormResourceEdit.CommonAndPartial;

/*
 * Copyright 1997-2011 Day Management AG
 * Barfuesserplatz 6, 4001 Basel, Switzerland
 * All Rights Reserved.
 *
 * This software is the confidential and proprietary information of
 * Day Management AG, ("Confidential Information"). You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with Day.
 */
package com.day.cq.wcm.foundation.forms;





public class FormResourceEditTest extends TestCase {
    
    private static final String PN_TEST = "test";

    public void testCommonAndPartial() {
        // basic test with 2 resources
        List<Resource> resources = new ArrayList<Resource>();
        resources.add(getResourceWithMultiValue(PN_TEST, "a", "b", "c"));
        resources.add(getResourceWithMultiValue(PN_TEST,      "b", "c", "d"));
        
        CommonAndPartial result = FormResourceEdit.getCommonAndPartialMultiValues(resources, PN_TEST);