use of io.jawg.osmcontributor.model.utils.OpeningTime in project osm-contributor by jawg.
the class OpeningTimeValueParserTest method parseDays1.
@Test
public void parseDays1() {
OpeningTime openingTime = new OpeningTime();
OpeningMonth openingMonth = new OpeningMonth();
OpeningHours openingHours = new OpeningHours();
openingHours.setAllDaysActivated(false);
openingHours.setDayActivated(0, true);
openingHours.setDayActivated(1, true);
openingHours.setDayActivated(6, true);
openingMonth.addOpeningHours(openingHours);
openingTime.addOpeningMonth(openingMonth);
Assert.assertEquals(parser.toValue(openingTime), "Mo-Tu,Su 08:00-18:00");
}
use of io.jawg.osmcontributor.model.utils.OpeningTime in project osm-contributor by jawg.
the class OpeningTimeValueParserTest method parseMonthAndDays2.
@Test
public void parseMonthAndDays2() {
OpeningTime openingTime = new OpeningTime();
OpeningMonth openingMonth = new OpeningMonth();
OpeningHours openingHours = new OpeningHours();
openingHours.setAllDaysActivated(false);
openingMonth.addOpeningHours(openingHours);
openingMonth.setMonthActivated(2, true);
openingHours.setDayActivated(2, true);
openingTime.addOpeningMonth(openingMonth);
Assert.assertEquals(parser.toValue(openingTime), "Mar: We 08:00-18:00");
}
Aggregations