use of org.n52.series.db.beans.QuantityDataEntity in project SOS by 52North.
the class AbstractObservationDAOTest method add_resultTime_from_phenomenonTime_timeIndeterminatePosition_now.
@Test
public void add_resultTime_from_phenomenonTime_timeIndeterminatePosition_now() throws CodedException {
DataEntity<?> observation = new QuantityDataEntity();
TimeInstant resultTime = new TimeInstant();
resultTime.setGmlId(PHENOMENON_TIME);
TimeInstant phenomeonTime = new TimeInstant(IndeterminateValue.NOW);
dao.addResultTimeToObservation(observation, resultTime, phenomeonTime);
Assert.assertTrue(observation.getResultTime() != null);
}
use of org.n52.series.db.beans.QuantityDataEntity in project SOS by 52North.
the class AbstractObservationDAOTest method add_resultTime_timeIndeterminatePosition_now.
@Test
public void add_resultTime_timeIndeterminatePosition_now() throws CodedException {
DataEntity<?> observation = new QuantityDataEntity();
TimeInstant resultTime = new TimeInstant(IndeterminateValue.NOW);
dao.addResultTimeToObservation(observation, resultTime, null);
Assert.assertTrue(observation.getResultTime() != null);
}
use of org.n52.series.db.beans.QuantityDataEntity in project SOS by 52North.
the class AbstractObservationDAOTest method add_resultTime_value_from_phenomenonTime.
@Test
public void add_resultTime_value_from_phenomenonTime() throws CodedException {
DataEntity<?> observation = new QuantityDataEntity();
TimeInstant resultTime = new TimeInstant();
resultTime.setGmlId(PHENOMENON_TIME);
TimeInstant phenomeonTime = new TimeInstant(new DateTime());
dao.addResultTimeToObservation(observation, resultTime, phenomeonTime);
Assert.assertTrue(observation.getResultTime() != null);
}
use of org.n52.series.db.beans.QuantityDataEntity in project SOS by 52North.
the class AbstractObservationDAOTest method add_phenomenonTime_instant_timeIndeterminatePosition_now.
@Test
public void add_phenomenonTime_instant_timeIndeterminatePosition_now() throws OwsExceptionReport {
DataEntity<?> observation = new QuantityDataEntity();
TimeInstant phenomenonTime = new TimeInstant(IndeterminateValue.NOW);
dao.addPhenomenonTimeToObservation(observation, phenomenonTime);
Assert.assertTrue(observation.getSamplingTimeStart() != null);
Assert.assertTrue(observation.getSamplingTimeEnd() != null);
}
Aggregations