Search in sources :

Example 11 with Event

use of com.thebluealliance.androidclient.models.Event in project the-blue-alliance-android by the-blue-alliance.

the class EventHelperTest method mockRegularEvent.

private static Event mockRegularEvent(EventType type, int year, int week) {
    Event event = mockEventType(type);
    when(event.getYear()).thenReturn(year);
    when(event.getWeek()).thenReturn(week);
    return event;
}
Also used : Event(com.thebluealliance.androidclient.models.Event)

Example 12 with Event

use of com.thebluealliance.androidclient.models.Event in project the-blue-alliance-android by the-blue-alliance.

the class EventHelperTest method mockEventType.

private static Event mockEventType(EventType type) {
    Event event = mock(Event.class);
    when(event.getEventTypeEnum()).thenReturn(type);
    return event;
}
Also used : Event(com.thebluealliance.androidclient.models.Event)

Example 13 with Event

use of com.thebluealliance.androidclient.models.Event in project the-blue-alliance-android by the-blue-alliance.

the class TeamEventsFragmentTest method setUp.

@Before
public void setUp() {
    mFragment = TeamEventsFragment.newInstance("frc1124", 2015);
    Event event = ModelMaker.getModel(Event.class, "2015cthar");
    EventRenderer renderer = new EventRenderer(null);
    mEvents = new ArrayList<>();
    mEvents.add(renderer.renderFromModel(event, false));
}
Also used : EventRenderer(com.thebluealliance.androidclient.renderers.EventRenderer) Event(com.thebluealliance.androidclient.models.Event) Before(org.junit.Before)

Example 14 with Event

use of com.thebluealliance.androidclient.models.Event in project the-blue-alliance-android by the-blue-alliance.

the class EventListFragmentTest method setUp.

@Before
public void setUp() {
    ArrayList<String> eventKeys = new ArrayList<>();
    eventKeys.add("2015cthar");
    mFragment = EventListFragment.newInstance(2015, eventKeys, true);
    Event event = ModelMaker.getModel(Event.class, "2015cthar");
    EventRenderer renderer = new EventRenderer(null);
    mEvents = new ArrayList<>();
    mEvents.add(renderer.renderFromModel(event, false));
}
Also used : EventRenderer(com.thebluealliance.androidclient.renderers.EventRenderer) ArrayList(java.util.ArrayList) Event(com.thebluealliance.androidclient.models.Event) Before(org.junit.Before)

Example 15 with Event

use of com.thebluealliance.androidclient.models.Event in project the-blue-alliance-android by the-blue-alliance.

the class DistrictEventsFragmentTest method setUp.

@Before
public void setUp() {
    mFragment = DistrictEventsFragment.newInstance("2015ne");
    Event event = ModelMaker.getModel(Event.class, "2015cthar");
    EventRenderer renderer = new EventRenderer(null);
    mEvents = new ArrayList<>();
    mEvents.add(renderer.renderFromModel(event, false));
}
Also used : EventRenderer(com.thebluealliance.androidclient.renderers.EventRenderer) Event(com.thebluealliance.androidclient.models.Event) Before(org.junit.Before)

Aggregations

Event (com.thebluealliance.androidclient.models.Event)35 Test (org.junit.Test)8 Team (com.thebluealliance.androidclient.models.Team)6 ArrayList (java.util.ArrayList)5 District (com.thebluealliance.androidclient.models.District)4 Date (java.util.Date)4 JsonObject (com.google.gson.JsonObject)3 TeamAvatarUpdateEvent (com.thebluealliance.androidclient.eventbus.TeamAvatarUpdateEvent)3 Match (com.thebluealliance.androidclient.models.Match)3 EventRenderer (com.thebluealliance.androidclient.renderers.EventRenderer)3 Before (org.junit.Before)3 Cursor (android.database.Cursor)2 Nullable (androidx.annotation.Nullable)2 WorkerThread (androidx.annotation.WorkerThread)2 JsonElement (com.google.gson.JsonElement)2 MatchSortByPlayOrderComparator (com.thebluealliance.androidclient.comparators.MatchSortByPlayOrderComparator)2 EventMatchesEvent (com.thebluealliance.androidclient.eventbus.EventMatchesEvent)2 LiveEventUpdateEvent (com.thebluealliance.androidclient.eventbus.LiveEventUpdateEvent)2 ListGroup (com.thebluealliance.androidclient.listitems.ListGroup)2 DistrictPointBreakdown (com.thebluealliance.androidclient.models.DistrictPointBreakdown)2