use of com.alexstyl.specialdates.events.peopleevents.ContactEventsOnADate in project Memento-Calendar by alexstyl.
the class ContactActionTest method testContactCorrectContactIsReturned.
@Test
public void testContactCorrectContactIsReturned() {
Date date = Date.Companion.on(1, JANUARY, 2016);
ArrayList<ContactEvent> contactEvent = new ArrayList<>();
contactEvent.add(EVENT_ONE);
ContactEventsOnADate events = ContactEventsOnADate.Companion.createFrom(date, contactEvent);
List<Contact> contacts = events.getContacts();
assertThat(contacts.get(0)).isEqualTo(CONTACT_ONE);
}
use of com.alexstyl.specialdates.events.peopleevents.ContactEventsOnADate in project Memento-Calendar by alexstyl.
the class ContactActionTest method testTheSameDateIsReturned.
@Test
public void testTheSameDateIsReturned() throws Exception {
Date expectedDate = Date.Companion.on(1, JANUARY, 1990);
ContactEventsOnADate events = ContactEventsOnADate.Companion.createFrom(expectedDate, ANY_CONTACTS);
Date actualDate = events.getDate();
assertThat(actualDate).isEqualTo(expectedDate);
}
Aggregations