Project

General

Profile

« Previous | Next » 

Revision c0497e2d

Added by Katja Luther almost 2 years ago

ref #10071: add statusNote to dto again

View differences:

cdmlib-persistence/src/test/java/eu/etaxonomy/cdm/persistence/dao/hibernate/taxon/TaxonNodeDaoHibernateImplTest.java
408 408

  
409 409
        List<TaxonNodeDto> result = taxonNodeDao.getTaxonNodeDto(null, "", null); // cant use "*" here since this is not supported by the method under test
410 410
        assertNotNull(result);
411
        assertEquals(4, result.size());
411
        assertEquals(5, result.size());
412 412
        assertEquals("20c8f083-5870-4cbd-bf56-c5b2b98ab6a7", result.get(0).getUuid().toString()); // Acherontia(Fabricius, 1798) rank: Genus
413 413
        assertEquals("0b5846e5-b8d2-4ca9-ac51-099286ea4adc", result.get(1).getUuid().toString()); // titleCache:Acherontia lachesis (Fabricius, 1798) rank: Species
414 414
        assertEquals("770239f6-4fa8-496b-8738-fe8f7b2ad519", result.get(2).getUuid().toString()); // titleCache:Acherontia styx Westwood, 1847 sec. cate-sphingidae.org rank: Species
......
420 420
    public final void testGetTaxonNodeDtoCheckSortIndex(){
421 421

  
422 422
        List<TaxonNodeDto> result = taxonNodeDao.getTaxonNodeDto(null, "", null); 
423
        assertEquals(4, result.size());
423
        assertEquals(5, result.size());
424 424
       
425 425
        assertTrue(0 == result.get(0).getSortIndex()); // Acherontia(Fabricius, 1798) rank: Genus
426 426
        assertTrue(0 == result.get(1).getSortIndex()); // titleCache:Acherontia lachesis (Fabricius, 1798) rank: Species
......
435 435
    public final void testGetTaxonNodeDtoCheckStatus(){
436 436

  
437 437
        List<TaxonNodeDto> result = taxonNodeDao.getTaxonNodeDto(null, "", null); 
438
        assertEquals(4, result.size());
438
        assertEquals(5, result.size());
439 439
       
440 440
        assertEquals(TaxonNodeStatus.UNPLACED, result.get(0).getStatus()); // Acherontia(Fabricius, 1798) rank: Genus
441 441
        assertEquals(null, result.get(1).getStatus());  // titleCache:Acherontia lachesis (Fabricius, 1798) rank: Species
......
445 445
    
446 446
    }
447 447

  
448
    @Test
449
    @DataSet ("TaxonNodeDaoHibernateImplTest.findWithoutRank.xml")
450
    public final void testGetTaxonNodeDtoCheckNote(){
451

  
452
        List<TaxonNodeDto> result = taxonNodeDao.getTaxonNodeDto(null, "", null);
453
        assertEquals(5, result.size());
454

  
455
        assertNotNull(result.get(3).getStatusNote()); // Acherontia(Fabricius, 1798) rank: Genus
456
        assertNotNull(result.get(4).getStatusNote());  // titleCache:Acherontia lachesis (Fabricius, 1798) rank: Species
457
//        assertEquals(null, result.get(2).getStatus());  // titleCache:Acherontia styx Westwood, 1847 sec. cate-sphingidae.org rank: Species
458
//        assertEquals(TaxonNodeStatus.EXCLUDED, result.get(3).getStatus());  // titleCache:Acherontia kohlbeckeri rank: Unknown Rank
459
//
460

  
461
    }
462

  
448 463

  
449 464
    @Override
450 465
    public void createTestDataSet() throws FileNotFoundException {}

Also available in: Unified diff