Search in sources :

Example 21 with OpeningMonth

use of io.jawg.osmcontributor.model.utils.OpeningMonth 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

OpeningMonth (io.jawg.osmcontributor.model.utils.OpeningMonth)21 Test (org.junit.Test)16 OpeningHours (io.jawg.osmcontributor.model.utils.OpeningHours)12 OpeningTime (io.jawg.osmcontributor.model.utils.OpeningTime)12 LocalTime (org.joda.time.LocalTime)6 RecyclerView (android.support.v7.widget.RecyclerView)2 View (android.view.View)2 DefaultItemAnimator (android.support.v7.widget.DefaultItemAnimator)1 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)1 BindView (butterknife.BindView)1 OpeningMonthAdapter (io.jawg.osmcontributor.ui.adapters.OpeningMonthAdapter)1 EditMonthsDialogFragment (io.jawg.osmcontributor.ui.dialogs.EditMonthsDialogFragment)1 PleaseApplyOpeningTimeChange (io.jawg.osmcontributor.ui.events.edition.PleaseApplyOpeningTimeChange)1 DividerItemDecoration (io.jawg.osmcontributor.ui.utils.views.DividerItemDecoration)1