Search in sources :

Example 21 with Contact

use of com.alexstyl.specialdates.contact.Contact 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);
}
Also used : ContactEvent(com.alexstyl.specialdates.date.ContactEvent) ArrayList(java.util.ArrayList) ContactEventsOnADate(com.alexstyl.specialdates.events.peopleevents.ContactEventsOnADate) ContactEventsOnADate(com.alexstyl.specialdates.events.peopleevents.ContactEventsOnADate) Date(com.alexstyl.specialdates.date.Date) Contact(com.alexstyl.specialdates.contact.Contact) Test(org.junit.Test)

Aggregations

Contact (com.alexstyl.specialdates.contact.Contact)21 Test (org.junit.Test)10 ContactEvent (com.alexstyl.specialdates.date.ContactEvent)9 ArrayList (java.util.ArrayList)8 Date (com.alexstyl.specialdates.date.Date)6 ContactsProvider (com.alexstyl.specialdates.contact.ContactsProvider)5 ContactEventsOnADate (com.alexstyl.specialdates.events.peopleevents.ContactEventsOnADate)3 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)2 RecyclerView (android.support.v7.widget.RecyclerView)2 View (android.view.View)2 UpcomingEventsView (com.alexstyl.specialdates.UpcomingEventsView)2 DisplayName (com.alexstyl.specialdates.contact.DisplayName)2 Notification (android.app.Notification)1 PendingIntent (android.app.PendingIntent)1 ContentValues (android.content.ContentValues)1 Intent (android.content.Intent)1 Bitmap (android.graphics.Bitmap)1 Paint (android.graphics.Paint)1 Nullable (android.support.annotation.Nullable)1 NotificationCompat (android.support.v4.app.NotificationCompat)1