Search in sources :

Example 6 with ObservableString

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);
}
Also used : ObservableString(org.fossasia.openevent.app.data.models.dto.ObservableString) Event(org.fossasia.openevent.app.data.models.Event)

Example 7 with ObservableString

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));
}
Also used : ObservableString(org.fossasia.openevent.app.data.models.dto.ObservableString) Event(org.fossasia.openevent.app.data.models.Event) ObservableString(org.fossasia.openevent.app.data.models.dto.ObservableString) Test(org.junit.Test)

Aggregations

ObservableString (org.fossasia.openevent.app.data.models.dto.ObservableString)7 Test (org.junit.Test)5 Event (org.fossasia.openevent.app.data.models.Event)4