Project

General

Profile

« Previous | Next » 

Revision ea33ac4f

Added by Andreas Müller almost 6 years ago

use long instead of int (cont.)

View differences:

cdmlib-persistence/src/test/java/eu/etaxonomy/cdm/persistence/dao/hibernate/taxon/TaxonDaoHibernateImplTest.java
898 898
        TaxonBase<?> taxon = taxonDao.findByUuid(sphingidae);
899 899
        assert taxon != null : "taxon cannot be null";
900 900

  
901
        int numberOfAuditEvents = taxonDao.countAuditEvents(taxon, null);
901
        long numberOfAuditEvents = taxonDao.countAuditEvents(taxon, null);
902 902
        assertEquals("countAuditEvents should return 2",numberOfAuditEvents,2);
903 903
    }
904 904

  
......
1098 1098
    public void testGetAuditEventsByTypeWithRestrictions() {
1099 1099
        commitAndStartNewTransaction(new String[]{"AUDITEVENT", "TAXONBASE_AUD"});
1100 1100

  
1101
        List<String> propertyPaths = new ArrayList<String>();
1101
        List<String> propertyPaths = new ArrayList<>();
1102 1102
        propertyPaths.add("name");
1103 1103
        propertyPaths.add("createdBy");
1104 1104
        propertyPaths.add("updatedBy");
......
1106 1106
        List<AuditCriterion> criteria = new ArrayList<>();
1107 1107
        criteria.add(AuditEntity.property("lsid_lsid").isNotNull());
1108 1108

  
1109
        int count = taxonDao.countAuditEvents(TaxonBase.class, null, null, null);
1109
        long count = taxonDao.countAuditEvents(TaxonBase.class, null, null, null);
1110 1110

  
1111 1111
        List<AuditEventRecord<TaxonBase>> auditEvents = taxonDao.getAuditEvents(TaxonBase.class, previousAuditEvent, mostRecentAuditEvent, criteria,null, null, AuditEventSort.FORWARDS, propertyPaths);
1112 1112
        assertNotNull("getAuditEvents should return a list",auditEvents);
......
1134 1134
        propertyPaths.add("name");
1135 1135
        propertyPaths.add("createdBy");
1136 1136
        propertyPaths.add("updatedBy");
1137
        int count = taxonDao.countAuditEvents(TaxonBase.class, null, null, null);
1137
        long count = taxonDao.countAuditEvents(TaxonBase.class, null, null, null);
1138 1138
        List<AuditEventRecord<TaxonBase>> auditEvents = taxonDao.getAuditEvents(TaxonBase.class, previousAuditEvent, mostRecentAuditEvent, null,null, null, AuditEventSort.FORWARDS, propertyPaths);
1139 1139
        assertNotNull("getAuditEvents should return a list", auditEvents);
1140 1140
        assertFalse("the list should not be empty", auditEvents.isEmpty());

Also available in: Unified diff