use of com.alexstyl.specialdates.events.namedays.NameCelebrations in project Memento-Calendar by alexstyl.
the class NamedayJSONParserTest method davidNamedayIsReturnedCorrectly.
@Test
public void davidNamedayIsReturnedCorrectly() {
NamedayBundle namedayBundle = NamedayJSONParser.getNamedaysFrom(namedayJSON);
NameCelebrations dates = namedayBundle.getDatesFor("Δαβίδ");
assertThatContainsDate(dates, Date.Companion.on(26, JUNE));
}
use of com.alexstyl.specialdates.events.namedays.NameCelebrations in project Memento-Calendar by alexstyl.
the class GreeklishParserTest method davidNamedayIsReturnedCorrectly.
@Test
public void davidNamedayIsReturnedCorrectly() {
NamedayBundle namedayBundle = NamedayJSONParser.getNamedaysFromJSONasSounds(namedayJSON);
NameCelebrations dates = namedayBundle.getDatesFor("Δαβίδ");
NameCelebrations datesGreeklish = namedayBundle.getDatesFor("David");
assertThatContainsSamedate(dates, datesGreeklish);
}
use of com.alexstyl.specialdates.events.namedays.NameCelebrations in project Memento-Calendar by alexstyl.
the class NamedayCalendar method getAllNamedays.
public NameCelebrations getAllNamedays(String searchQuery) {
NameCelebrations names = namedayBundle.getDatesFor(searchQuery);
NameCelebrations specialNames = strategy.getNamedaysFor(searchQuery, year);
Dates dates = new Dates(names.getDates());
dates.addAll(specialNames.getDates());
String matchingName = getName(names, specialNames);
return new NameCelebrations(matchingName, dates);
}
use of com.alexstyl.specialdates.events.namedays.NameCelebrations in project Memento-Calendar by alexstyl.
the class GreeklishParserTest method magdoulaNamedayIsReturnedCorrectly.
@Test
public void magdoulaNamedayIsReturnedCorrectly() {
NamedayBundle namedayBundle = NamedayJSONParser.getNamedaysFromJSONasSounds(namedayJSON);
NameCelebrations dates = namedayBundle.getDatesFor("Αμαλία");
NameCelebrations datesGreeklish = namedayBundle.getDatesFor("Amalia");
assertThatContainsSamedate(dates, datesGreeklish);
}
use of com.alexstyl.specialdates.events.namedays.NameCelebrations in project Memento-Calendar by alexstyl.
the class CharacterNodeTest method gettingDateFromEmptyNodeReturnsNoDates.
@Test
public void gettingDateFromEmptyNodeReturnsNoDates() throws Exception {
Node node = new CharacterNode();
NameCelebrations extracted = node.getDates("Alex");
assertThat(extracted.getDates().size()).isZero();
}
Aggregations