Project

General

Profile

Revision 8555ad50

ID8555ad507ba92604f86008701df1b2e52011b70e
Parent d0b1ea31
Child 6c782c0a

Added by Andreas Kohlbecker almost 4 years ago

ref #7103 TypedEntityReference: harmonizing equals with hashCode method (ignore label) and reenabling testcase in SpecimenTypeDesignationWorkingSetServiceImplTest

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/model/TypedEntityReference.java
68 68
    public boolean equals(Object obj) {
69 69
        try {
70 70
            TypedEntityReference other = (TypedEntityReference) obj;
71
            return id == other.id && label.equals(other.label) && type.equals(other.type);
71
            return id == other.id && type.equals(other.type);
72 72

  
73 73
        } catch (Exception e) {
74 74
            return false;
src/test/java/eu/etaxonomy/cdm/service/SpecimenTypeDesignationWorkingSetServiceImplTest.java
207 207
    @DataSet("SpecimenTypeDesignationWorkingSetServiceImplTest-deleteTest.xml")
208 208
    public void test02_deleteWorkingset() {
209 209

  
210
        // printDataSetWithNull(System.err, includeTableNames_delete);
210
//        printDataSetWithNull(System.err, includeTableNames_delete);
211 211

  
212 212
        TypedEntityReference<FieldUnit> baseEntityRef = new TypedEntityReference<FieldUnit>(FieldUnit.class, 5001, null);
213 213

  
214
        try {
215

  
216 214
        SpecimenTypeDesignationWorkingSetDTO<Registration> workingset = service.loadDtoByIds(registrationId, baseEntityRef);
217 215
        Assert.assertNotNull(workingset.getOwner());
218 216
        Assert.assertEquals(2, workingset.getSpecimenTypeDesignationDTOs().size());
......
230 228
        Assert.assertEquals("All derived units should have been deleted", 0, cdmRepository.getOccurrenceService().count(DerivedUnit.class));
231 229
        Assert.assertEquals("FieldUnit should have been deleted", 0, cdmRepository.getOccurrenceService().count(FieldUnit.class));
232 230
        Assert.assertEquals("Gathering event should have been deleted by orphan remove", 0, cdmRepository.getEventBaseService().count(GatheringEvent.class));
233
        // FIXME  Assert.assertEquals("Media should have been deleted ", 0, cdmRepository.getMediaService().count(null));
234
        } catch (Exception e){
235
            e.printStackTrace(System.err);
236
        }
231
        // FIXME Assert.assertEquals("Media should have been deleted ", 0, cdmRepository.getMediaService().count(null));
232

  
237 233
        // printDataSetWithNull(System.err, includeTableNames_delete);
238 234
    }
239 235

  

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)