use of nl.knaw.huygens.timbuctoo.model.Datable in project timbuctoo by HuygensING.
the class DatableTest method testCompareToBigger.
@Test
public void testCompareToBigger() {
Datable first = new Datable("20131011");
Datable second = new Datable("20131010");
assertEquals(1, first.compareTo(second));
}
use of nl.knaw.huygens.timbuctoo.model.Datable in project timbuctoo by HuygensING.
the class DatableTest method testGetUpperLimitNoEndDateSpecified.
@Test
public void testGetUpperLimitNoEndDateSpecified() {
Datable rangeWithoutEndDate = new Datable("2013/open");
assertThat(rangeWithoutEndDate.getUpperLimit(), is(nullValue()));
}
use of nl.knaw.huygens.timbuctoo.model.Datable in project timbuctoo by HuygensING.
the class DatableTest method convertYear_month_day_q.
@Test
public void convertYear_month_day_q() {
String edtf = "16480515?";
Assert.assertTrue(EdtfPattern.YEAR_MONTH_DAY_Q.matches(edtf));
testDatable("1648-05-15:12", "1648-05-15:12", Datable.Certainty.LOW, new Datable(edtf));
}
use of nl.knaw.huygens.timbuctoo.model.Datable in project timbuctoo by HuygensING.
the class DatableTest method testEqualsEqual.
@Test
public void testEqualsEqual() {
Datable first = new Datable("20131011");
Datable second = new Datable("20131011");
assertTrue(first.equals(second));
}
use of nl.knaw.huygens.timbuctoo.model.Datable in project timbuctoo by HuygensING.
the class DatableTest method convertYear_month_q.
@Test
public void convertYear_month_q() {
Assert.assertTrue(EdtfPattern.YEAR_MONTH_Q.matches("2001-01?"));
Assert.assertFalse(EdtfPattern.YEAR_MONTH_Q.matches("2010"));
Assert.assertFalse(EdtfPattern.YEAR_MONTH_Q.matches("2???-02-13"));
testDatable("2010-03-01:12", "2010-03-31:12", Datable.Certainty.LOW, new Datable("2010-03?"));
}
Aggregations