use of com.thebluealliance.api.model.IMatchAlliance in project the-blue-alliance-android by the-blue-alliance.
the class MatchTest method testMatchModel.
@Test
public void testMatchModel() {
assertNotNull(mMatch);
assertEquals(mMatch.getKey(), "2014cmp_f1m1");
assertEquals(mMatch.getMatchNumber().intValue(), 1);
assertEquals(mMatch.getSetNumber().intValue(), 1);
assertEquals(mMatch.getEventKey(), "2014cmp");
assertNotNull(mMatch.getTime());
assertEquals(mMatch.getTime().intValue(), 1398551880);
assertNotNull(mMatch.getVideos());
assertNotNull(mMatch.getAlliances());
List<IMatchVideo> videos = mMatch.getVideos();
assertEquals(videos.size(), 2);
IMatchVideo video1 = videos.get(0);
assertEquals(video1.getType(), "youtube");
assertEquals(video1.getKey(), "jdJutaggCMk");
IMatchAlliancesContainer alliances = mMatch.getAlliances();
IMatchAlliance blueAlliance = alliances.getBlue();
assertEquals(blueAlliance.getScore().intValue(), 361);
List<String> blueTeams = blueAlliance.getTeamKeys();
assertEquals(blueTeams.size(), 3);
assertEquals(blueTeams.get(0), "frc469");
}
Aggregations