Search in sources :

Example 26 with OpeningHours

use of io.jawg.osmcontributor.model.utils.OpeningHours in project osm-contributor by jawg.

the class OpeningMonthValueParserTest method nonStop1.

@Test
public void nonStop1() {
    OpeningMonth openingMonth = new OpeningMonth();
    OpeningHours openingHours = new OpeningHours();
    openingHours.setDayActivated(0, true);
    openingHours.setDayActivated(1, true);
    openingHours.setDayActivated(2, true);
    openingHours.setDayActivated(3, true);
    openingHours.setDayActivated(4, true);
    openingHours.setDayActivated(5, true);
    openingHours.setDayActivated(6, true);
    openingMonth.addOpeningHours(openingHours);
    openingHours.setFromTime(new LocalTime(23, 59));
    openingHours.setToTime(new LocalTime(23, 58));
    Assert.assertEquals(parser.toValue(openingMonth), "24/7");
}
Also used : LocalTime(org.joda.time.LocalTime) OpeningMonth(io.jawg.osmcontributor.model.utils.OpeningMonth) OpeningHours(io.jawg.osmcontributor.model.utils.OpeningHours) Test(org.junit.Test)

Aggregations

OpeningHours (io.jawg.osmcontributor.model.utils.OpeningHours)26 Test (org.junit.Test)21 LocalTime (org.joda.time.LocalTime)17 OpeningMonth (io.jawg.osmcontributor.model.utils.OpeningMonth)12 OpeningTime (io.jawg.osmcontributor.model.utils.OpeningTime)9 View (android.view.View)2 EditText (android.widget.EditText)2 EditDaysDialogFragment (io.jawg.osmcontributor.ui.dialogs.EditDaysDialogFragment)2 PleaseApplyOpeningTimeChange (io.jawg.osmcontributor.ui.events.edition.PleaseApplyOpeningTimeChange)2