*/\r
@Test\r
public void testNewInstance() {\r
- Assert.assertNotNull("The specimen should have been created", specimenFacade.getDerivedUnit());\r
+ Assert.assertNotNull("The specimen should have been created", specimenFacade.innerDerivedUnit());\r
//???\r
// Assert.assertNotNull("The derivation event should have been created", specimenFacade.getSpecimen().getDerivedFrom());\r
// Assert.assertNotNull("The field observation should have been created", specimenFacade.getFieldObservation());\r
*/\r
@Test\r
public void testNewInstanceSpecimen() {\r
- Assert.assertSame("Specimen should be same", specimen, specimenFacade.getDerivedUnit());\r
- Assert.assertSame("Derivation event should be same", derivationEvent, specimenFacade.getDerivedUnit().getDerivedFrom());\r
- Assert.assertSame("Field observation should be same", fieldObservation, specimenFacade.getFieldObservation());\r
- Assert.assertSame("Gathering event should be same", gatheringEvent, specimenFacade.getGatheringEvent());\r
+ Assert.assertSame("Specimen should be same", specimen, specimenFacade.innerDerivedUnit());\r
+ Assert.assertSame("Derivation event should be same", derivationEvent, specimenFacade.innerDerivedUnit().getDerivedFrom());\r
+ Assert.assertSame("Field observation should be same", fieldObservation, specimenFacade.innerFieldObservation());\r
+ Assert.assertSame("Gathering event should be same", gatheringEvent, specimenFacade.innerGatheringEvent());\r
\r
}\r
\r
specimenFacade = DerivedUnitFacade.NewInstance(specimen);\r
specimenFacade.setDistanceToGround(2);\r
FieldObservation specimenFieldObservation = (FieldObservation)specimen.getDerivedFrom().getOriginals().iterator().next();\r
- Assert.assertSame("Facade gathering event and specimen gathering event should be the same",specimenFacade.getGatheringEvent(), specimenFieldObservation.getGatheringEvent());\r
+ Assert.assertSame("Facade gathering event and specimen gathering event should be the same",specimenFacade.innerGatheringEvent(), specimenFieldObservation.getGatheringEvent());\r
} catch (DerivedUnitFacadeNotSupportedException e) {\r
Assert.fail("An error should not occur in NewInstance()");\r
}\r
DerivedUnitFacade specimenFacade;\r
try {\r
specimenFacade = DerivedUnitFacade.NewInstance(specimen);\r
- Assert.assertNull("No field observation should exists", specimenFacade.getFieldObservation());\r
+ Assert.assertNull("No field observation should exists", specimenFacade.innerFieldObservation());\r
} catch (DerivedUnitFacadeNotSupportedException e) {\r
Assert.fail("An error should not occur in NewInstance()");\r
}\r
NamedArea newCollectingArea = NamedArea.NewInstance("A nice area", "nice", "n");\r
specimenFacade.addCollectingArea(newCollectingArea);\r
Assert.assertEquals("Exactly 1 area must exist", 1, specimenFacade.getCollectingAreas().size());\r
- Assert.assertSame("Areas should be same", newCollectingArea, specimenFacade.getFieldObservation().getGatheringEvent().getCollectingAreas().iterator().next());\r
+ Assert.assertSame("Areas should be same", newCollectingArea, specimenFacade.innerFieldObservation().getGatheringEvent().getCollectingAreas().iterator().next());\r
specimenFacade.addCollectingArea(tdwgArea);\r
Assert.assertEquals("Exactly 2 areas must exist", 2, specimenFacade.getCollectingAreas().size());\r
specimenFacade.removeCollectingArea(newCollectingArea);\r
emptyFacade.setDistanceToWaterSurface(13);\r
Assert.assertNotNull("Field observation must exist if distance to water exists", emptyFacade.getFieldObservation(false));\r
Assert.assertNotNull("Gathering event must exist if distance to water exists", emptyFacade.getGatheringEvent(false));\r
- FieldObservation specimenFieldObservation = (FieldObservation)emptyFacade.getDerivedUnit().getDerivedFrom().getOriginals().iterator().next();\r
+ FieldObservation specimenFieldObservation = (FieldObservation)emptyFacade.innerDerivedUnit().getDerivedFrom().getOriginals().iterator().next();\r
Assert.assertSame("Gathering event of facade and of specimen must be the same", specimenFieldObservation.getGatheringEvent(), emptyFacade.getGatheringEvent(false));\r
}\r
\r
public void testSetExactLocationByParsing(){\r
Point point1;\r
try {\r
- specimenFacade.setExactLocationByParsing("11¡34'20\"W", "34¡30,34'N", null, null);\r
+ specimenFacade.setExactLocationByParsing("112\u00B034'20\"W", "34\u00B030,34'N", null, null);\r
point1 = specimenFacade.getExactLocation();\r
Assert.assertNotNull("", point1.getLatitude());\r
System.out.println(point1.getLatitude().toString());\r
Assert.assertNull("Empty facace must not have any field value" ,emptyFacade.getFieldNumber());\r
emptyFacade.setFieldNumber("1256A");\r
Assert.assertNotNull("Field observation must exist if field number exists", emptyFacade.getFieldObservation(false));\r
- FieldObservation specimenFieldObservation = (FieldObservation)emptyFacade.getDerivedUnit().getDerivedFrom().getOriginals().iterator().next();\r
+ FieldObservation specimenFieldObservation = (FieldObservation)emptyFacade.innerDerivedUnit().getDerivedFrom().getOriginals().iterator().next();\r
Assert.assertSame("Field observation of facade and of specimen must be the same", specimenFieldObservation, emptyFacade.getFieldObservation(false));\r
Assert.assertEquals("1256A", emptyFacade.getFieldNumber());\r
}\r
Assert.assertFalse("The initial distance to ground should not be 43", specimenFacade.getDistanceToGround() == 43);\r
specimenFacade.setGatheringEvent(newGatheringEvent);\r
Assert.assertTrue("The final distance to ground should be 43", specimenFacade.getDistanceToGround() == 43);\r
- Assert.assertSame("The new gathering event should be 'newGatheringEvent'", newGatheringEvent, specimenFacade.getGatheringEvent());\r
+ Assert.assertSame("The new gathering event should be 'newGatheringEvent'", newGatheringEvent, specimenFacade.innerGatheringEvent());\r
}\r
\r
/**\r
- * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getGatheringEvent()}.\r
+ * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#innerGatheringEvent()}.\r
*/\r
@Test\r
public void testGetGatheringEvent() {\r
- Assert.assertNotNull("Gathering event must not be null", specimenFacade.getGatheringEvent()); \r
- Assert.assertEquals("Gathering event must be field observations gathering event", specimenFacade.getFieldObservation().getGatheringEvent(), specimenFacade.getGatheringEvent());\r
+ Assert.assertNotNull("Gathering event must not be null", specimenFacade.innerGatheringEvent()); \r
+ Assert.assertEquals("Gathering event must be field observations gathering event", specimenFacade.innerFieldObservation().getGatheringEvent(), specimenFacade.innerGatheringEvent());\r
}\r
\r
/**\r
}\r
\r
/**\r
- * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getDerivedUnit()}.\r
+ * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#innerDerivedUnit()}.\r
*/\r
@Test\r
public void testGetSpecimen() {\r
- Assert.assertEquals("Specimen must be same", specimen, specimenFacade.getDerivedUnit()); \r
+ Assert.assertEquals("Specimen must be same", specimen, specimenFacade.innerDerivedUnit()); \r
}\r
\r
/**\r
specimenFacade.removeDuplicate(newSpecimen1);\r
Assert.assertEquals("There should be 1 duplicate now", 1, specimenFacade.getDuplicates().size());\r
Assert.assertSame("The only duplicate should be 'newSpecimen2' now", newSpecimen2, specimenFacade.getDuplicates().iterator().next());\r
- specimenFacade.addDuplicate(specimenFacade.getDerivedUnit());\r
+ specimenFacade.addDuplicate(specimenFacade.innerDerivedUnit());\r
Assert.assertEquals("There should be still 1 duplicate because the facade specimen is not a duplicate", 1, specimenFacade.getDuplicates().size());\r
\r
Collection newCollection = Collection.NewInstance();\r
} catch (DerivedUnitFacadeNotSupportedException e) {\r
Assert.fail("Multiple derivation events in line should not throw a not supported exception");\r
}\r
- Assert.assertSame("Gathering event should derive from the derivation line", existingGatheringEvent, specimenFacade.getGatheringEvent());\r
+ Assert.assertSame("Gathering event should derive from the derivation line", existingGatheringEvent, specimenFacade.innerGatheringEvent());\r
Assert.assertEquals("Mediasize should be 0. Only Imagegallery media are supported", 0, specimenFacade.getFieldObjectMedia().size());\r
}\r
\r