Project

General

Profile

« Previous | Next » 

Revision 3ba4be67

Added by Katja Luther about 6 years ago

adapt all tests to updated test data

View differences:

cdmlib-services/src/test/java/eu/etaxonomy/cdm/api/service/OccurrenceServiceDeepDeleteTest.java
138 138
        Pager<TypeDesignationBase> typeDesignations = nameService.getTypeDesignations(name, null, 100, 0);
139 139
        Long oldCount= typeDesignations.getCount();
140 140
        //check initial state
141
        assertEquals(assertMessage, 3, occurrenceService.count(SpecimenOrObservationBase.class));
142
        assertEquals(assertMessage, 2, eventService.count(DerivationEvent.class));
143
        assertEquals(assertMessage, 1, occurrenceService.count(FieldUnit.class));
144
        assertEquals(assertMessage, 2, occurrenceService.count(DerivedUnit.class));
145
        assertEquals(assertMessage, 1, occurrenceService.count(DnaSample.class));
141
        assertEquals(assertMessage, 6, occurrenceService.count(SpecimenOrObservationBase.class));
142
        assertEquals(assertMessage, 4, eventService.count(DerivationEvent.class));
143
        assertEquals(assertMessage, 2, occurrenceService.count(FieldUnit.class));
144
        assertEquals(assertMessage, 4, occurrenceService.count(DerivedUnit.class));
145
        assertEquals(assertMessage, 2, occurrenceService.count(DnaSample.class));
146 146
        assertEquals("incorrect number of amplification results", 1, dnaSample.getAmplificationResults().size());
147 147
        assertEquals("number of sequences incorrect", 1, dnaSample.getSequences().size());
148 148
        assertEquals("incorrect number of single reads", 1, dnaSample.getAmplificationResults().iterator().next().getSingleReads().size());
......
150 150
        //delete field unit
151 151
        deleteResult = occurrenceService.delete(fieldUnit, config);
152 152
        assertTrue(deleteResult.toString(), deleteResult.isOk());
153
        assertEquals(assertMessage, 0, eventService.count(DerivationEvent.class));
154
        assertEquals(assertMessage, 0, occurrenceService.count(SpecimenOrObservationBase.class));
155
        assertEquals(assertMessage, 0, occurrenceService.count(FieldUnit.class));
156
        assertEquals(assertMessage, 0, occurrenceService.count(DerivedUnit.class));
157
        assertEquals(assertMessage, 0, occurrenceService.count(DnaSample.class));
153
        assertEquals(assertMessage, 2, eventService.count(DerivationEvent.class));
154
        assertEquals(assertMessage, 3, occurrenceService.count(SpecimenOrObservationBase.class));
155
        assertEquals(assertMessage, 1, occurrenceService.count(FieldUnit.class));
156
        assertEquals(assertMessage, 2, occurrenceService.count(DerivedUnit.class));
157
        assertEquals(assertMessage, 1, occurrenceService.count(DnaSample.class));
158 158
        typeDesignations = nameService.getTypeDesignations(name, null, 100, 0);
159 159
        Long afterDeleteCount= typeDesignations.getCount();
160 160
        assertTrue(oldCount > afterDeleteCount);

Also available in: Unified diff