use of com.alexstyl.specialdates.date.Date in project Memento-Calendar by alexstyl.
the class ShortDateLabelCreatorTest method givenDateWithYear_whenAskingForNoYear_NoYearIsReturned.
@Test
public void givenDateWithYear_whenAskingForNoYear_NoYearIsReturned() {
Date date = Date.Companion.on(5, MAY, 1990);
String dateToString = CREATOR.createLabelWithNoYearFor(date);
assertThat(dateToString).isEqualTo("05-05");
}
use of com.alexstyl.specialdates.date.Date in project Memento-Calendar by alexstyl.
the class OrthodoxEasterCalculatorTest method easternDatesAreCalcualtedProperly.
@Test
public void easternDatesAreCalcualtedProperly() {
for (int year : EXPECTED_DATES.keySet()) {
Date expectedDate = EXPECTED_DATES.get(year);
Date actualDate = calculator.calculateEasterForYear(year);
assertThat(actualDate).isEqualTo(expectedDate);
assertThatCalendarsReferToTheSameDate(expectedDate, actualDate);
}
}
use of com.alexstyl.specialdates.date.Date in project Memento-Calendar by alexstyl.
the class CharacterNodeTest method addingADate_isPlacedUnderTheRightNode.
@Test
public void addingADate_isPlacedUnderTheRightNode() {
Node node = new CharacterNode();
Date date = Date.Companion.on(1, 2, 1990);
node.addDate("Alex", date);
NameCelebrations extracted = node.getDates("Alex");
assertThat(extracted.getDate(0)).isEqualTo(date);
}
Aggregations