Project

General

Profile

« Previous | Next » 

Revision 9383e254

Added by Andreas Müller almost 8 years ago

Try to fix pattern issue in taxon uuidAndTitleCache search

View differences:

cdmlib-persistence/src/test/java/eu/etaxonomy/cdm/persistence/dao/hibernate/taxon/TaxonDaoHibernateImplTest.java
1059 1059
        List<UuidAndTitleCache<TaxonNode>> result = taxonDao.getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(classification, null, null, null);
1060 1060
        assertNotNull(result);
1061 1061
        assertEquals(5, result.size());
1062

  
1063
        //test exclude
1062 1064
        UUID excludeUUID = UUID.fromString("a9f42927-e507-4fda-9629-62073a908aae");
1063 1065
        List<UUID> excludeUUids = new ArrayList<UUID>();
1064 1066
        excludeUUids.add(excludeUUID);
1065 1067
        result = taxonDao.getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(classification, excludeUUids, null, null);
1066 1068
        assertEquals(4, result.size());
1067 1069

  
1070
        //test limit
1071
        int limit = 2;
1072
        result = taxonDao.getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(classification, null, limit, null);
1073
        assertEquals(2, result.size());
1074

  
1075
        //test pattern
1076
        String pattern = "*Rothschi*";
1077
        result = taxonDao.getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(classification, null, 2, pattern);
1078
        assertNotNull(result);
1079
        assertEquals(1, result.size());
1080
        assertEquals("0b5846e5-b8d2-4ca9-ac51-099286ea4adc", result.get(0).getUuid().toString());
1081

  
1068 1082
    }
1069 1083

  
1070 1084

  

Also available in: Unified diff