Search in sources :

Example 1 with RenderArgs

use of com.thebluealliance.androidclient.renderers.MatchRenderer.RenderArgs in project the-blue-alliance-android by the-blue-alliance.

the class MatchRendererTest method testRenderFromModel.

@Test
public void testRenderFromModel() {
    @RenderType int[] types = { RENDER_DEFAULT, RENDER_NOTIFICATION, RENDER_MATCH_INFO };
    for (int i = 0; i < types.length; i++) {
        MatchListElement element = mRenderer.renderFromModel(mMatch, types[i]);
        RenderArgs expectedArgs = MatchRenderer.argsFromMode(types[i]);
        assertMatch(element, mMatch, expectedArgs);
    }
}
Also used : MatchListElement(com.thebluealliance.androidclient.listitems.MatchListElement) RenderArgs(com.thebluealliance.androidclient.renderers.MatchRenderer.RenderArgs) RenderType(com.thebluealliance.androidclient.renderers.MatchRenderer.RenderType) Test(org.junit.Test)

Example 2 with RenderArgs

use of com.thebluealliance.androidclient.renderers.MatchRenderer.RenderArgs in project the-blue-alliance-android by the-blue-alliance.

the class MatchRendererTest method testRenderFromKey.

@Test
public void testRenderFromKey() {
    when(mDatafeed.fetchMatch(mMatchKey)).thenReturn(Observable.just(mMatch));
    MatchListElement element = mRenderer.renderFromKey(mMatchKey, ModelType.MATCH, null);
    RenderArgs expectedArgs = MatchRenderer.argsFromMode(RENDER_DEFAULT);
    assertMatch(element, mMatch, expectedArgs);
}
Also used : MatchListElement(com.thebluealliance.androidclient.listitems.MatchListElement) RenderArgs(com.thebluealliance.androidclient.renderers.MatchRenderer.RenderArgs) Test(org.junit.Test)

Aggregations

MatchListElement (com.thebluealliance.androidclient.listitems.MatchListElement)2 RenderArgs (com.thebluealliance.androidclient.renderers.MatchRenderer.RenderArgs)2 Test (org.junit.Test)2 RenderType (com.thebluealliance.androidclient.renderers.MatchRenderer.RenderType)1