use of org.fossasia.openevent.app.data.models.dto.ObservableString in project open-event-orga-app by fossasia.
the class FragmentInstanceTest method setUpMockEvent.
private void setUpMockEvent() {
Event event = new Event();
event.timezone = "UTC";
event.endsAt = new ObservableString("2018-12-14T23:59:59.123456+00:00");
ContextManager.setSelectedEvent(event);
}
use of org.fossasia.openevent.app.data.models.dto.ObservableString in project open-event-orga-app by fossasia.
the class DateServiceTest method testClashLive.
@Test
public void testClashLive() {
Event liveLatest = new Event();
String nowMinus5 = DateUtils.formatDateToIso(LocalDateTime.now().minusDays(5));
String nowPlus5 = DateUtils.formatDateToIso(LocalDateTime.now().plusDays(5));
liveLatest.setStartsAt(new ObservableString(nowMinus5));
liveLatest.setEndsAt(new ObservableString(nowPlus5));
assertEquals(1, DateService.compareEventDates(LIVE, liveLatest));
}
Aggregations