Project

General

Profile

Revision e797de01

IDe797de012b123fa9cbb57216ebd92d9019c11120
Parent 02d46959
Child 180fa299

Added by Katja Luther about 4 years ago

missing changes in test

View differences:

cdmlib-persistence/src/test/java/eu/etaxonomy/cdm/persistence/dao/hibernate/taxon/TaxonDaoHibernateImplTest.java
1056 1056
    @DataSet ("TaxonDaoHibernateImplTest.testGetTaxaByNameAndArea.xml")
1057 1057
    public final void testGetTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(){
1058 1058
        Classification classification = classificationDao.findByUuid(classificationUuid);
1059
        List<UuidAndTitleCache<TaxonNode>> result = taxonDao.getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(classification, null, null, null);
1059
        List<UuidAndTitleCache<TaxonNode>> result = taxonDao.getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(classification,  null, null);
1060 1060
        assertNotNull(result);
1061 1061
        assertEquals(5, result.size());
1062 1062

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

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

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

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)