Revision adec36b1
Added by Andreas Müller over 3 years ago
src/test/java/eu/etaxonomy/cdm/service/SpecimenTypeDesignationWorkingSetServiceImplTest.java | ||
---|---|---|
92 | 92 |
@DataSet("SpecimenTypeDesignationWorkingSetServiceImplTest.xml") |
93 | 93 |
public void test01_createAndEditTest() throws DerivedUnitConversionException, URISyntaxException, FileNotFoundException { |
94 | 94 |
|
95 |
// printDataSetWithNull(System.err, new String[]{"USERACCOUNT", "GROUPS", "USERACCOUNT_GRANTEDAUTHORITYIMPL", "USERACCOUNT_PERMISSIONGROUP"
|
|
95 |
// printDataSet(System.err, new String[]{"USERACCOUNT", "GROUPS", "USERACCOUNT_GRANTEDAUTHORITYIMPL", "USERACCOUNT_PERMISSIONGROUP" |
|
96 | 96 |
// , "PERMISSIONGROUP", "PERMISSIONGROUP_GRANTEDAUTHORITYIMPL", "GRANTEDAUTHORITYIMPL"}); |
97 | 97 |
|
98 |
//printDataSetWithNull(System.err, debugTables);
|
|
98 |
// printDataSet(System.err, debugTables);
|
|
99 | 99 |
// writeDbUnitDataSetFile(new String[]{"AUDITEVENT", "DEFINEDTERMBASE", "DEFINEDTERMBASE_AUD", "DEFINEDTERMBASE_REPRESENTATION", "DEFINEDTERMBASE_REPRESENTATION_AUD", |
100 | 100 |
// "REPRESENTATION", "REPRESENTATION_AUD", "HIBERNATE_SEQUENCES"}, |
101 | 101 |
// "RegistrationTerms"); |
... | ... | |
122 | 122 |
|
123 | 123 |
SpecimenOrObservationBase<?> baseEntity = cdmRepository.getOccurrenceService().load(workingset.getFieldUnit().getUuid()); |
124 | 124 |
|
125 |
printDataSetWithNull(System.err, new String[]{"TYPEDESIGNATIONBASE", "SPECIMENOROBSERVATIONBASE"});
|
|
125 |
// printDataSet(System.err, new String[]{"TYPEDESIGNATIONBASE", "SPECIMENOROBSERVATIONBASE"});
|
|
126 | 126 |
|
127 |
TypedEntityReference<FieldUnit> baseEntityRef = new TypedEntityReference<FieldUnit>(FieldUnit.class, baseEntity.getUuid(), baseEntity.getTitleCache());
|
|
127 |
TypedEntityReference<FieldUnit> baseEntityRef = new TypedEntityReference<>(FieldUnit.class, baseEntity.getUuid(), baseEntity.getTitleCache()); |
|
128 | 128 |
|
129 | 129 |
workingset = service.load(registrationUuid, baseEntityRef); |
130 | 130 |
|
... | ... | |
150 | 150 |
|
151 | 151 |
// write test data for delete test |
152 | 152 |
/* |
153 |
// printDataSetWithNull(System.err, includeTableNames_delete);
|
|
153 |
// printDataSet(System.err, includeTableNames_delete); |
|
154 | 154 |
writeDbUnitDataSetFile(includeTableNames_delete, "deleteTest"); |
155 | 155 |
*/ |
156 | 156 |
/* The following audit table fix needs also to be added to the test data: |
... | ... | |
190 | 190 |
|
191 | 191 |
service.save(workingset); |
192 | 192 |
|
193 |
// printDataSetWithNull(System.err, includeTableNames_delete);
|
|
193 |
// printDataSet(System.err, includeTableNames_delete); |
|
194 | 194 |
|
195 | 195 |
workingset = service.load(registrationUuid, baseEntityRef); |
196 | 196 |
Registration reg = workingset.getOwner(); |
... | ... | |
203 | 203 |
@DataSet("SpecimenTypeDesignationWorkingSetServiceImplTest-deleteTest.xml") |
204 | 204 |
public void test02_deleteWorkingset() { |
205 | 205 |
|
206 |
// printDataSetWithNull(System.err, includeTableNames_delete);
|
|
206 |
// printDataSet(System.err, includeTableNames_delete); |
|
207 | 207 |
|
208 |
TypedEntityReference<FieldUnit> baseEntityRef = new TypedEntityReference<FieldUnit>(FieldUnit.class, fieldUnitUuid, null);
|
|
208 |
TypedEntityReference<FieldUnit> baseEntityRef = new TypedEntityReference<>(FieldUnit.class, fieldUnitUuid, null); |
|
209 | 209 |
|
210 | 210 |
SpecimenTypeDesignationWorkingSetDTO<Registration> workingset = service.load(registrationUuid, baseEntityRef); |
211 | 211 |
Assert.assertNotNull(workingset.getOwner()); |
... | ... | |
225 | 225 |
Assert.assertEquals("Gathering event should have been deleted by orphan remove", 0, cdmRepository.getEventBaseService().count(GatheringEvent.class)); |
226 | 226 |
// FIXME Assert.assertEquals("Media should have been deleted ", 0, cdmRepository.getMediaService().count(null)); |
227 | 227 |
|
228 |
// printDataSetWithNull(System.err, includeTableNames_delete);
|
|
228 |
// printDataSet(System.err, includeTableNames_delete); |
|
229 | 229 |
} |
230 | 230 |
|
231 | 231 |
// ---------------------- TestData ------------------------------------------- |
... | ... | |
255 | 255 |
reg.setUuid(registrationUuid); |
256 | 256 |
reg = cdmRepository.getRegistrationService().save(reg); |
257 | 257 |
|
258 |
//printDataSetWithNull(System.err, includeTableNames_create);
|
|
258 |
//printDataSet(System.err, includeTableNames_create); |
|
259 | 259 |
|
260 | 260 |
writeDbUnitDataSetFile(includeTableNames_create); |
261 | 261 |
} |
Also available in: Unified diff
cleanup