Search in sources :

Example 6 with SimplePerson

use of org.apache.ignite.tests.pojos.SimplePerson in project ignite by apache.

the class TestsHelper method checkSimplePersonMapsEqual.

/**
 */
public static <K> boolean checkSimplePersonMapsEqual(Map<K, SimplePerson> map1, Map<K, SimplePerson> map2, boolean primitiveFieldsOnly) {
    if (map1 == null || map2 == null || map1.size() != map2.size())
        return false;
    for (K key : map1.keySet()) {
        SimplePerson person1 = map1.get(key);
        SimplePerson person2 = map2.get(key);
        boolean equals = person1 != null && person2 != null && (primitiveFieldsOnly ? person1.equalsPrimitiveFields(person2) : person1.equals(person2));
        if (!equals)
            return false;
    }
    return true;
}
Also used : SimplePerson(org.apache.ignite.tests.pojos.SimplePerson)

Aggregations

SimplePerson (org.apache.ignite.tests.pojos.SimplePerson)6 SimplePersonId (org.apache.ignite.tests.pojos.SimplePersonId)3 LinkedList (java.util.LinkedList)2 CacheEntryImpl (org.apache.ignite.internal.processors.cache.CacheEntryImpl)2 PersonId (org.apache.ignite.tests.pojos.PersonId)2 Test (org.junit.Test)2 Date (java.util.Date)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 Ignite (org.apache.ignite.Ignite)1 CacheStore (org.apache.ignite.cache.store.CacheStore)1 ClassPathResource (org.springframework.core.io.ClassPathResource)1